Commit dbf8eefa authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Paul Mackerras

[POWERPC] spufs: don't yield CPU in spu_yield

There is no reason to yield the CPU in spu_yield - if the backing
thread reenters spu_run it gets added to the end of the runqueue for
it's priority.  So the yield is just a slowdown for the case where
we have higher priority contexts waiting.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 28066ae9
...@@ -438,7 +438,6 @@ void spu_deactivate(struct spu_context *ctx) ...@@ -438,7 +438,6 @@ void spu_deactivate(struct spu_context *ctx)
void spu_yield(struct spu_context *ctx) void spu_yield(struct spu_context *ctx)
{ {
struct spu *spu; struct spu *spu;
int need_yield = 0;
if (mutex_trylock(&ctx->state_mutex)) { if (mutex_trylock(&ctx->state_mutex)) {
if ((spu = ctx->spu) != NULL) { if ((spu = ctx->spu) != NULL) {
...@@ -447,13 +446,10 @@ void spu_yield(struct spu_context *ctx) ...@@ -447,13 +446,10 @@ void spu_yield(struct spu_context *ctx)
pr_debug("%s: yielding SPU %d NODE %d\n", pr_debug("%s: yielding SPU %d NODE %d\n",
__FUNCTION__, spu->number, spu->node); __FUNCTION__, spu->number, spu->node);
spu_deactivate(ctx); spu_deactivate(ctx);
need_yield = 1;
} }
} }
mutex_unlock(&ctx->state_mutex); mutex_unlock(&ctx->state_mutex);
} }
if (unlikely(need_yield))
yield();
} }
int __init spu_sched_init(void) int __init spu_sched_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment