[Cbe-oss-dev] [PATCH 3/3] spu sched: forced preemption at execution

Arnd Bergmann arnd at arndb.de
Wed Feb 28 11:15:51 EST 2007


On Tuesday 27 February 2007, Christoph Hellwig wrote:
> On Tue, Feb 27, 2007 at 01:30:23PM +0100, Arnd Bergmann wrote:
> > a reference to the task_struct in the spu_context while we're inside
> > of spu_run(), but then we can always access the up-to-date priority
> > data from the right place.
> 
> As soon as we have our own dynamic timeslicing we will need to actually
> change prio, and the cpu scheduler will get badly confused if you modify
> it underneath.

Right, if you want to store dynamic priority for the context, it obviously
needs to be stored in there. I was assuming that it is enough to store
some information about the length and end of the previous time slice in
there in order to determine the length of the next one, but I guess that
is equivalent to storing a dynamic priority.

However, the static priority (nice value), rt_priority and policy should
not be modified by the SPU scheduler AFAICS, so I see no reason to create
redundant copies that easily get outdated.

	Arnd <><



More information about the cbe-oss-dev mailing list