aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-03-23 10:12:26 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-12 13:55:15 -0400
commitdbf8eefa2b814d6922492120bfa46d4bc42ceb20 (patch)
treebb70c85fdcbce38001e9a5d9f1bb556e1eb4379f /arch
parent28066ae91b2050d79531a6f2d5e35dd8f666bafd (diff)
[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: Christoph Hellwig <hch@lst.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 39823cec0844..c9561582ce2a 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -438,7 +438,6 @@ void spu_deactivate(struct spu_context *ctx)
438void spu_yield(struct spu_context *ctx) 438void spu_yield(struct spu_context *ctx)
439{ 439{
440 struct spu *spu; 440 struct spu *spu;
441 int need_yield = 0;
442 441
443 if (mutex_trylock(&ctx->state_mutex)) { 442 if (mutex_trylock(&ctx->state_mutex)) {
444 if ((spu = ctx->spu) != NULL) { 443 if ((spu = ctx->spu) != NULL) {
@@ -447,13 +446,10 @@ void spu_yield(struct spu_context *ctx)
447 pr_debug("%s: yielding SPU %d NODE %d\n", 446 pr_debug("%s: yielding SPU %d NODE %d\n",
448 __FUNCTION__, spu->number, spu->node); 447 __FUNCTION__, spu->number, spu->node);
449 spu_deactivate(ctx); 448 spu_deactivate(ctx);
450 need_yield = 1;
451 } 449 }
452 } 450 }
453 mutex_unlock(&ctx->state_mutex); 451 mutex_unlock(&ctx->state_mutex);
454 } 452 }
455 if (unlikely(need_yield))
456 yield();
457} 453}
458 454
459int __init spu_sched_init(void) 455int __init spu_sched_init(void)