[Cbe-oss-dev] [PATCH 3/6] spufs: fix starvation case with terminated spes
Arnd Bergmann
arnd.bergmann at de.ibm.com
Wed Feb 13 15:43:23 EST 2008
On Wednesday 06 February 2008, Luke Browning wrote:
> Fix spu starvation case with terminated ctxts.
>
> Terminated spe contexts need to yield the spu, so that the spufs scheduler
> can service the runqueue. Can't rely on the libspe to destroy the context
> as it is not a trusted entity. Fixes a testcase where a program creates
> 100 standalone contexts (ie. gang of one) and then waits for them to
> complete before it starts to destroy contexts.
>
> Moved spu_yield() into spu_run_fini() to avoid the extra lock reference.
>
> Signed-off-by: Luke Browning <lukebrowning at us.ibm.com>
I don't understand this patch, how is a context that returned 0x2000
different from any other? Obviously, you'd want it to become descheduled
also if it returns 0x2001 or any user-specific stop code that lets
the context be idle for some time.
If we don't apply "force" in the __spu_deactivate(), shouldn't the context
always become deactivated if there is any other context waiting to get
scheduled?
Arnd <><
More information about the cbe-oss-dev
mailing list