[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200802045141.130533-1-arch0.zheng@gmail.com>
Date: Sun, 2 Aug 2020 12:51:41 +0800
From: Qi Zheng <arch0.zheng@...il.com>
To: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de
Cc: linux-kernel@...r.kernel.org, Qi Zheng <arch0.zheng@...il.com>
Subject: [PATCH] sched/fair: Fix the logic about active_balance in load_balance()
I think the unbalance scenario here should be that we need to
do active balance but it is not actually done. So fix it.
Signed-off-by: Qi Zheng <arch0.zheng@...il.com>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2ba8f230feb9..6d8c53718b67 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9710,7 +9710,7 @@ static int load_balance(int this_cpu, struct rq *this_rq,
} else
sd->nr_balance_failed = 0;
- if (likely(!active_balance) || voluntary_active_balance(&env)) {
+ if (likely(!active_balance) && voluntary_active_balance(&env)) {
/* We were unbalanced, so reset the balancing interval */
sd->balance_interval = sd->min_interval;
} else {
--
2.25.1
Powered by blists - more mailing lists