[Cbe-oss-dev] [PATCH 2/2] [POWERPC] spufs: fix invalid scheduling of forgotten contexts

Jeremy Kerr jk at ozlabs.org
Mon Mar 3 14:57:36 EST 2008


Hi Luke,

> The context could be time sliced while in user mode, if it was lazily
> loaded.  If there is not another context on run queue, when the yield
> at the end of spu_run is run, the context remains loaded.  We both
> submitted patches for this recently.

Sure, we're loaded, but we're not on the run queue, and cannot ever be 
on it from the point that spu_forget is called.

> But, I was speaking generally.  The forget code shouldn't have to
> care about where a context is or is not.

I disagree. spu_forget is only supposed to be called in a context 
destruction path, to dissocate the context from its mm. It should never 
be called with a spu that is somehow going to be run.

So, having to take the context out of the run queue would mean we have a 
bug.

Cheers,


Jeremy



More information about the cbe-oss-dev mailing list