From 401abc5b6bf3c2d00ef058ee7d671e23beeeb820 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Tue, 12 Mar 2024 12:27:34 -0700 Subject: [PATCH] sched/fair: Set asym priority equally for all CPUs in a performance domain All CPUs in a performance domain share the same capacity, and therefore aren't different from one another when distinguishing between which one is better for asymmetric packing. Instead of unfairly prioritizing lower-numbered CPUs within the same performance domain, treat all CPUs in a performance domain equally for asymmetric packing. Change-Id: Ibc18d45fabc2983650ebebec910578e26bd26809 Signed-off-by: Sultan Alsawaf Signed-off-by: Pranav Vashi --- 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 24daf87a5f18..100211ca52e6 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -162,11 +162,11 @@ __read_mostly unsigned int sysctl_sched_walt_cpu_high_irqload = #ifdef CONFIG_SMP /* - * For asym packing, by default the lower numbered cpu has higher priority. + * For asym packing, by default the lower max-capacity cpu has higher priority. */ int __weak arch_asym_cpu_priority(int cpu) { - return -cpu; + return -arch_scale_cpu_capacity(NULL, cpu); } #endif