]> err.no Git - linux-2.6/commitdiff
[POWERPC] spusched: No preemption for nosched contexts
authorChristoph Hellwig <hch@lst.de>
Fri, 29 Jun 2007 00:57:58 +0000 (10:57 +1000)
committerPaul Mackerras <paulus@samba.org>
Tue, 3 Jul 2007 05:24:45 +0000 (15:24 +1000)
And last but not least we need to make sure the scheduler tick never
preempts a nosched context.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/cell/spufs/sched.c

index a20e4e28858c514e7dfc76cda2b25703d122afcb..7bb5229b1e3c7b002cf388fd79a148969ea418d1 100644 (file)
@@ -522,7 +522,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;
 
        /*