Skip to content

Commit

Permalink
[POWERPC] spusched: No preemption for nosched contexts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Paul Mackerras committed Jul 3, 2007
1 parent 46cbf93 commit df09cf3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/powerpc/platforms/cell/spufs/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit df09cf3

Please sign in to comment.