From: Luke Browning Date: Fri, 6 Jun 2008 03:26:54 +0000 (+0800) Subject: powerpc/spufs: don't extend time time slice if context is not in spu_run X-Git-Tag: v2.6.27-rc1~1058^2~55 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2442a8ba5abe2c27c572bc522da1c33df98c6ec7;p=linux-2.6 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 Signed-off-by: Jeremy Kerr --- diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index e929e70a84..afb92d4fbc 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) 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);