[Cbe-oss-dev] [PATCH 4:6] spufs: fix spu time slice count

Christoph Hellwig hch at lst.de
Tue May 13 19:54:23 EST 2008


On Mon, May 12, 2008 at 02:37:15PM +0000, Luke Browning wrote:
> Fix spu time slice count
> 
> An spu context shouldn't get an extra tick if the time slice code 
> couldn't find something else to run.

Well, we still give it the extrace slice when it's actually running,
and that's intended because no one else would use it otherwise.  What
your code does is to not give it another slice when it's not running.

But in the case where you don't add 1 to that now simply means we'll
get an unsigned overflow instead when the next scheduler tick happens,
I don't think that's a good idea either.

We probably want to simply unload an idle context when it's time slice
runs out even if no one is waiting for the resouce so that idle contexts
don't remain on the spu forever.  On the other hand that would have
adverse effect when a context performs a ppu assisted library call just
before the end of it's time slice.




More information about the cbe-oss-dev mailing list