Skip to content

Commit

Permalink
powerpc/spufs: don't extend time time slice if context is not in spu_run
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luke Browning authored and Jeremy Kerr committed Jul 9, 2008
1 parent 46deed6 commit 2442a8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/cell/spufs/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2442a8b

Please sign in to comment.