We should only avoid do the active load balance when there is no cfs type task. If just use rq->nr_running, it is possible for the source cpu has multiple rt task, while zero cfs task, so that it would confuse the active load balance function that try to move, but find no task it could move.
Signed-off-by: Lei Wen <lei...@marvell.com> --- kernel/sched/fair.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 3656603..4c96124 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5349,7 +5349,7 @@ static int active_load_balance_cpu_stop(void *data) goto out_unlock; /* Is there any task to move? */ - if (busiest_rq->nr_running <= 1) + if (busiest_rq->cfs.h_nr_running == 0) goto out_unlock; /* -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/