From: Christoph Hellwig Date: Fri, 29 Jun 2007 00:57:58 +0000 (+1000) Subject: [POWERPC] spusched: No preemption for nosched contexts X-Git-Tag: v2.6.23-rc1~767^2^2~67 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df09cf3e2cd597d373f3a6046df0e0a50881ea44;p=linux-2.6 [POWERPC] spusched: No preemption for nosched contexts And last but not least we need to make sure the scheduler tick never preempts a nosched context. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index a20e4e2885..7bb5229b1e 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -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; /*