]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] spu sched: ensure preempted threads are put back on the runqueue, part2
authorChristoph Hellwig <hch@lst.de>
Mon, 23 Apr 2007 19:08:09 +0000 (21:08 +0200)
committerArnd Bergmann <arnd@klappe.arndb.de>
Mon, 23 Apr 2007 19:18:53 +0000 (21:18 +0200)
To not lose a spu thread we need to make sure it always gets put back
on the runqueue.  In find_victim aswell as in the scheduler tick as done
in the previous patch.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
arch/powerpc/platforms/cell/spufs/sched.c

index 5149dff65c9eba3e987a6da438ce17c95f552892..405a0555d75cbaf4fd7551107a48d7d0d481b61d 100644 (file)
@@ -391,6 +391,12 @@ static struct spu *find_victim(struct spu_context *ctx)
                        }
                        spu_unbind_context(spu, victim);
                        mutex_unlock(&victim->state_mutex);
+                       /*
+                        * We need to break out of the wait loop in spu_run
+                        * manually to ensure this context gets put on the
+                        * runqueue again ASAP.
+                        */
+                       wake_up(&victim->stop_wq);
                        return spu;
                }
        }