We should really only be looking for CFS tasks, since that's all detach_one_task() can ever pull.
Replace the rq.nr_running check with a rq.cfs.h_nr_running one to do just that. Signed-off-by: Valentin Schneider <valentin.schnei...@arm.com> --- kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 79bd6ead589c..099aad1930bb 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9206,8 +9206,8 @@ static int active_load_balance_cpu_stop(void *data) !busiest_rq->active_balance)) goto out_unlock; - /* Is there any task to move? */ - if (busiest_rq->nr_running <= 1) + /* Is there any CFS task to move? */ + if (busiest_rq->cfs.h_nr_running < 1) goto out_unlock; /* -- 2.22.0