From: Gautham R Shenoy Date: Mon, 15 Oct 2007 15:00:14 +0000 (+0200) Subject: sched: fix rt ptracer monopolizing CPU X-Git-Tag: firefly_0821_release~25905^2~33 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=638e13ac37a1a89473415f407cbffc1688a20fe2;p=firefly-linux-kernel-4.4.55.git 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 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; }