Commit e097b513 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Arnd Bergmann

[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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
parent b3e76cc3
...@@ -391,6 +391,12 @@ static struct spu *find_victim(struct spu_context *ctx) ...@@ -391,6 +391,12 @@ static struct spu *find_victim(struct spu_context *ctx)
} }
spu_unbind_context(spu, victim); spu_unbind_context(spu, victim);
mutex_unlock(&victim->state_mutex); 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; return spu;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment