diff options
author | Gautham R Shenoy <ego@in.ibm.com> | 2007-10-15 17:00:14 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 17:00:14 +0200 |
commit | 638e13ac37a1a89473415f407cbffc1688a20fe2 (patch) | |
tree | c39999a223e8b272819c3676684c88d40aa47040 /kernel | |
parent | 5cb350baf580017da38199625b7365b1763d7180 (diff) | |
download | linux-638e13ac37a1a89473415f407cbffc1688a20fe2.tar.bz2 |
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: Gautham R Shenoy <ego@in.ibm.com>
Credit: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 9ac99896db8f..48fc74b6df55 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1133,7 +1133,7 @@ repeat: * yield - it could be a while. */ if (unlikely(on_rq)) { - yield(); + schedule_timeout_uninterruptible(1); goto repeat; } |