[Cbe-oss-dev] [PATCH 3/6] spufs: fix starvation case with terminated spes
Luke Browning
lukebr at linux.vnet.ibm.com
Thu Feb 7 22:41:21 EST 2008
On Thu, 2008-02-07 at 07:14 +0100, Christoph Hellwig wrote:
> 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.
>
I kept spu_yield() as it seemed like a service that somebody would want
sooner rather than later. I think that we should make it callable from
the spu. Some time this year we will document a programming model for
direct problem state access and I expect that spu_yield() will be
something that we need. But, I can remove it if you like.
Luke
More information about the cbe-oss-dev
mailing list