From: Kirill Tkhai Date: Thu, 6 Mar 2014 15:16:15 +0000 (+0400) Subject: sched/fair: Fix endless loop in idle_balance() X-Git-Tag: v4.14-rc1~7852^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35805ff8f4fc535ac85330170d3c56829c87c677;p=platform%2Fkernel%2Flinux-rpi.git sched/fair: Fix endless loop in idle_balance() Check for fair tasks number to decide, that we've pulled a task. rq's nr_running may contain throttled RT tasks. Signed-off-by: Kirill Tkhai Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/r/1394118975.19290.104.camel@tkhai Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 10db4a8..f1eedae 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6710,7 +6710,7 @@ static int idle_balance(struct rq *this_rq) * While browsing the domains, we released the rq lock. * A task could have be enqueued in the meantime */ - if (this_rq->nr_running && !pulled_task) { + if (this_rq->cfs.h_nr_running && !pulled_task) { pulled_task = 1; goto out; }