[Cbe-oss-dev] [PATCH 2/2] spu sched: static timeslicing for SCHED_RR contexts
Benjamin Herrenschmidt
benh at kernel.crashing.org
Sat Feb 10 21:28:19 EST 2007
> We have a number of places in the context switch code right now where
> we do a cond_resched() or something similar when we're waiting for
> the SPU for too long. This requires some detailed analysis to see if
> we ever wait for extended times in those places.
>
> Also, the context switch itself can take some time, e.g. if there are
> hash misses from the SPU involved during the DMA transfers. I'd rather
> not think about scheduling in spu contexts at interrupt time.
My idea is not to wait. It's to basically do some asynchronous version
of spu_run that gets the rq lock, checks wether there's an SPU with that
context already in (lazy context switching is great !) and if yes, kicks
it off right away. If not, then you defer...
Ben.
More information about the cbe-oss-dev
mailing list