[Cbe-oss-dev] spusched: timeslicing

Christoph Hellwig hch at lst.de
Tue Apr 10 22:12:29 EST 2007


On Sat, Apr 07, 2007 at 08:18:24AM -0300, Luke Browning wrote:
> Hi Christoph,
> 
> The current code starts and stops a timer each time a context is started
> and stopped. This is a relatively heavy operation that disables
> interrupts and takes a lock each time an spu is started or stopped, and
> the behavior is application dependent. An application that pages faults
> a lot or invokes a lot of remote system calls could generate thousands
> of timer requests. I think that we should use a more traditional
> approach here with a per BE or SPU timer that ticks independently of the
> SPU at a steady rate. Say 10 times a second. You would need to time
> stamp spu dispatch cycles and accrue spu utilization in the context
> structure. The time slice code would ue this information along with
> runqueue state to determine whether a context switch should occur.  Time
> slicing code would be the same for SCHED_RR and SCHED_OTHER.

This definitively has advantages, but it also has the downside that
we'd still have ticks when spu load is low.  I've long put onto my
todo list to play around with a scheme of the dynamic ticks scheduler
we recently merged for the cpu side.



More information about the cbe-oss-dev mailing list