Skip to content

Commit

Permalink
[POWERPC] spu sched: ensure preempted threads are put back on the run…
Browse files Browse the repository at this point in the history
…queue, 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>
  • Loading branch information
Christoph Hellwig authored and Arnd Bergmann committed Apr 23, 2007
1 parent b3e76cc commit e097b51
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/powerpc/platforms/cell/spufs/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit e097b51

Please sign in to comment.