[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250627-rneri-fix-cas-clusters-v1-3-121ffb50bbc7@linux.intel.com>
Date: Fri, 27 Jun 2025 14:45:29 -0700
From: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
To: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>,
Tim C Chen <tim.c.chen@...ux.intel.com>, Barry Song <baohua@...nel.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
ricardo.neri@...el.com, linux-kernel@...r.kernel.org,
Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
Subject: [PATCH 3/4] sched/fair: Allow load balancing between CPUs of equal
capacity
sched_balance_find_src_rq() is supposed to avoid picking as busiest a
runqueue with a single running task since that would result in the task
migrating to a lower-capacity CPU. It also prevents migrations between CPUs
of equal capacity.
Migrating tasks between CPUs of equal capacity helps when balancing load in
a scheduling domain in which there are CPUs of different capacity and are
grouped in clusters of CPUs of equal capacity that share L2 cache. Load
should be balanced among these clusters when CONFIG_SCHED_CLUSTER is
enabled.
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
---
kernel/sched/fair.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 3c50ecffa4c7..a7fd4f1f4348 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -11388,6 +11388,7 @@ static struct rq *sched_balance_find_src_rq(struct lb_env *env,
* average load.
*/
if (env->sd->flags & SD_ASYM_CPUCAPACITY &&
+ capacity_of(env->dst_cpu) != capacity &&
!capacity_greater(capacity_of(env->dst_cpu), capacity) &&
nr_running == 1)
continue;
--
2.43.0
Powered by blists - more mailing lists