[Cbe-oss-dev] [PATCH 4/3] spusched: no preemption for nosched contexts

Christoph Hellwig hch at lst.de
Tue Jun 5 05:19:44 EST 2007


And last but not least we need to make sure the scheduler tick never
preempts a nosched context.


Signed-off-by: Christoph Hellwig <hch at lst.de>

Index: linux-cell/arch/powerpc/platforms/cell/spufs/sched.c
===================================================================
--- linux-cell.orig/arch/powerpc/platforms/cell/spufs/sched.c	2007-06-04 19:39:32.000000000 +0200
+++ linux-cell/arch/powerpc/platforms/cell/spufs/sched.c	2007-06-04 19:40:35.000000000 +0200
@@ -720,7 +720,12 @@ void spu_yield(struct spu_context *ctx)
 
 static void spusched_tick(struct spu_context *ctx)
 {
-	if (ctx->policy == SCHED_FIFO || --ctx->time_slice)
+	if (ctx->flags & SPU_CREATE_NOSCHED)
+		return;
+	if (ctx->policy == SCHED_FIFO)
+		return;
+
+	if (--ctx->time_slice)
 		return;
 
 	/*



More information about the cbe-oss-dev mailing list