From: Gautham R Shenoy Date: Mon, 15 Oct 2007 15:00:14 +0000 (+0200) Subject: sched: fix rt ptracer monopolizing CPU X-Git-Tag: v2.6.24-rc1~1289^2~33 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=638e13ac37a1a89473415f407cbffc1688a20fe2;p=linux-2.6 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 Credit: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched.c b/kernel/sched.c index 9ac99896db..48fc74b6df 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; }