diff options
author | Christoph Hellwig <hch@lst.de> | 2007-04-23 15:08:09 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-04-23 15:18:53 -0400 |
commit | e097b513285e616215b23af234d127298bb8d89a (patch) | |
tree | 97af431b53f545d7a004c2e686db2bc4273e1cc4 | |
parent | b3e76cc3244ac139fc75750c5af9edbb9f191a10 (diff) |
[POWERPC] spu sched: ensure preempted threads are put back on the runqueue, part2
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>
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/sched.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 5149dff65c9e..405a0555d75c 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -391,6 +391,12 @@ static struct spu *find_victim(struct spu_context *ctx) | |||
391 | } | 391 | } |
392 | spu_unbind_context(spu, victim); | 392 | spu_unbind_context(spu, victim); |
393 | mutex_unlock(&victim->state_mutex); | 393 | mutex_unlock(&victim->state_mutex); |
394 | /* | ||
395 | * We need to break out of the wait loop in spu_run | ||
396 | * manually to ensure this context gets put on the | ||
397 | * runqueue again ASAP. | ||
398 | */ | ||
399 | wake_up(&victim->stop_wq); | ||
394 | return spu; | 400 | return spu; |
395 | } | 401 | } |
396 | } | 402 | } |