[Cbe-oss-dev] spusched: timeslicing

Luke Browning lukebr at linux.vnet.ibm.com
Sat Apr 7 21:18:24 EST 2007


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.

Regards,
Luke





More information about the cbe-oss-dev mailing list