Skip to content

Commit

Permalink
sched/fair: Fix endless loop in idle_balance()
Browse files Browse the repository at this point in the history
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 <ktkhai@parallels.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1394118975.19290.104.camel@tkhai
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Kirill Tkhai authored and Ingo Molnar committed Mar 11, 2014
1 parent 4c6c4e3 commit 35805ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 35805ff

Please sign in to comment.