Merge "sched/walt: Adjust cpu clusters for mid cap CPUs"

This commit is contained in:
qctecmdr 2023-07-31 07:04:38 -07:00 committed by Gerrit - the friendly Code Review server
commit a32c14eced

View File

@ -2583,6 +2583,19 @@ static inline void assign_cluster_ids(struct list_head *head)
sched_cluster[pos++] = cluster;
}
if (pos == 4) {
if (arch_scale_cpu_capacity(
cpumask_first(&sched_cluster[1]->cpus)) <
arch_scale_cpu_capacity(
cpumask_first(&sched_cluster[2]->cpus))) {
cluster = sched_cluster[2];
sched_cluster[2] = sched_cluster[1];
sched_cluster[1] = cluster;
sched_cluster[1]->id = 2;
sched_cluster[2]->id = 1;
}
}
WARN_ON(pos > MAX_CLUSTERS);
}