]> err.no Git - linux-2.6/commitdiff
powerpc/spufs: don't extend time time slice if context is not in spu_run
authorLuke Browning <lukebrowning@us.ibm.com>
Fri, 6 Jun 2008 03:26:54 +0000 (11:26 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Wed, 9 Jul 2008 00:13:40 +0000 (10:13 +1000)
An spu context shouldn't get an extra tick if the time slice code
couldn't find something else to run. This means contexts that are not
within spu_run (ie, SPU_SCHED_SPU_RUN is cleared) will not receive
extra ticks while we have no other contexts waiting.

Signed-off-by: Luke Browning <lukebrowning@us.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
arch/powerpc/platforms/cell/spufs/sched.c

index e929e70a84e3c96af13da6d7730d14276b5e6874..afb92d4fbcf5d89ec0d64bd31333a9d315c414d6 100644 (file)
@@ -899,7 +899,8 @@ static noinline void spusched_tick(struct spu_context *ctx)
                        spu_add_to_rq(ctx);
        } else {
                spu_context_nospu_trace(spusched_tick__newslice, ctx);
-               ctx->time_slice++;
+               if (!ctx->time_slice)
+                       ctx->time_slice++;
        }
 out:
        spu_release(ctx);