[Cbe-oss-dev] [PATCH 3/6] spufs: fix starvation case with terminated spes

Christoph Hellwig hch at lst.de
Thu Feb 7 17:14:17 EST 2008


On Wed, Feb 06, 2008 at 03:43:33PM -0200, 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. 

Looks fine.  But after your patch there is no caller of spu_yield left,
so please remove it.  Or keep __spu_yield as spu_yield and document the
new locking.




More information about the cbe-oss-dev mailing list