lkml.org 
[lkml]   [2019]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] sched/fair: Check for CFS tasks in active_load_balance_cpu_stop()
Date
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.schneider@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
\
 
 \ /
  Last update: 2019-08-07 19:42    [W:0.043 / U:1.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site