[Cbe-oss-dev] [PATCH 10/21] spusched: no preemption for nosched contexts
Jeremy Kerr
jk at ozlabs.org
Fri Jun 29 10:57:58 EST 2007
From: Christoph Hellwig <hch at lst.de>
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>
Signed-off-by: Arnd Bergmann <arnd.bergmann at de.ibm.com>
Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
arch/powerpc/platforms/cell/spufs/sched.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index a20e4e2..7bb5229 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;
/*
--
1.5.0.rc4.g85b1
More information about the cbe-oss-dev
mailing list