[Cbe-oss-dev] [PATCH] spusched: ix variable length timeslice calculation

Luke Browning lukebr at linux.vnet.ibm.com
Wed May 30 02:12:31 EST 2007


On Tue, 2007-05-29 at 14:14 +0200, Christoph Hellwig wrote:
> On Sun, May 27, 2007 at 08:57:22PM -0300, Luke Browning wrote:
> > Fix millisecond calculations.  
> 
> Actually the intention was to have time slices 10 times as long as
> the spu scheduler due to the context switch overhead as mention in
> the mail with the patch.
> 
> I supposed I should update the comment above the definition to reflect
> that fact :)

I believe HZ is 250 by default.  

For nice -20 SPE contexts, the time slice is eight seconds.

	max(1000 * 40 / 20, 12) = 2000 ticks x 4 mseconds = 8 seconds

>From normal jobs, it is 1 second.  

The time slice slew for the PPC scheduler is 800 to 48 msecs (48 due to
integer truncation).  The question is how long should a job be able to
run before scheduler schedules another job at the same priority level.  

8 seconds is a very long time, particularly if you have to wait for N
jobs to be scheduled first.  There may also be benefits in the
concurrent scheduling of SPEs and PPC threads, particularly, if we ever
implement a function offload library model.  You want SPE and PPE
threads to be time sliced together.

I think that we should just use the PPC default values.   

regards,
Luke

		






More information about the cbe-oss-dev mailing list