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 <sultan@kerneltoast.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
Sultan Alsawaf
2024-03-12 12:27:34 -07:00
committed by Pranav Vashi
parent ea91002ce3
commit 401abc5b6b

View File

@@ -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