提交 638e13ac 编写于 作者: G Gautham R Shenoy 提交者: Ingo Molnar

sched: fix rt ptracer monopolizing CPU

yield() in wait_task_inactive(), can cause a high priority thread to be
scheduled back in, and there by loop forever while it is waiting for some
lower priority thread which is unfortunately still on the runqueue.

Use schedule_timeout_uninterruptible(1) instead.
Signed-off-by: NGautham R Shenoy <ego@in.ibm.com>
Credit: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 5cb350ba
......@@ -1133,7 +1133,7 @@ void wait_task_inactive(struct task_struct *p)
* yield - it could be a while.
*/
if (unlikely(on_rq)) {
yield();
schedule_timeout_uninterruptible(1);
goto repeat;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册