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

Luke Browning lukebr at linux.vnet.ibm.com
Tue May 13 00:37:15 EST 2008


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.

Signed-off-by: Luke Browning <lukebrowning at us.ibm.com>

---

Index: spufs/arch/powerpc/platforms/cell/spufs/sched.c
===================================================================
--- spufs.orig/arch/powerpc/platforms/cell/spufs/sched.c
+++ spufs/arch/powerpc/platforms/cell/spufs/sched.c
@@ -884,7 +884,8 @@ static noinline void spusched_tick(struc
 			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);





More information about the cbe-oss-dev mailing list