]> err.no Git - linux-2.6/commitdiff
[POWERPC] spufs: don't yield CPU in spu_yield
authorChristoph Hellwig <hch@lst.de>
Fri, 23 Mar 2007 14:12:26 +0000 (15:12 +0100)
committerPaul Mackerras <paulus@samba.org>
Thu, 12 Apr 2007 17:55:15 +0000 (03:55 +1000)
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>
arch/powerpc/platforms/cell/spufs/sched.c

index 39823cec08444c6244ea8ca149fb4af39630be99..c9561582ce2a30da4ec2674414c273b7b79e32a4 100644 (file)
@@ -438,7 +438,6 @@ void spu_deactivate(struct spu_context *ctx)
 void spu_yield(struct spu_context *ctx)
 {
        struct spu *spu;
-       int need_yield = 0;
 
        if (mutex_trylock(&ctx->state_mutex)) {
                if ((spu = ctx->spu) != NULL) {
@@ -447,13 +446,10 @@ void spu_yield(struct spu_context *ctx)
                                pr_debug("%s: yielding SPU %d NODE %d\n",
                                         __FUNCTION__, spu->number, spu->node);
                                spu_deactivate(ctx);
-                               need_yield = 1;
                        }
                }
                mutex_unlock(&ctx->state_mutex);
        }
-       if (unlikely(need_yield))
-               yield();
 }
 
 int __init spu_sched_init(void)