aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorLuke Browning <lukebrowning@us.ibm.com>2008-06-05 23:26:54 -0400
committerJeremy Kerr <jk@ozlabs.org>2008-07-08 20:13:40 -0400
commit2442a8ba5abe2c27c572bc522da1c33df98c6ec7 (patch)
tree0b3f40533af215f2116e024ccfb488d8890c9517 /arch/powerpc/platforms
parent46deed69b34d0aa6065e92ad79685e103d4ccd35 (diff)
powerpc/spufs: don't extend time time slice if context is not in spu_run
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>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index e929e70a84e3..afb92d4fbcf5 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -899,7 +899,8 @@ static noinline void spusched_tick(struct spu_context *ctx)
899 spu_add_to_rq(ctx); 899 spu_add_to_rq(ctx);
900 } else { 900 } else {
901 spu_context_nospu_trace(spusched_tick__newslice, ctx); 901 spu_context_nospu_trace(spusched_tick__newslice, ctx);
902 ctx->time_slice++; 902 if (!ctx->time_slice)
903 ctx->time_slice++;
903 } 904 }
904out: 905out:
905 spu_release(ctx); 906 spu_release(ctx);