Revert "sched/fair: Fixes for capacity inversion detection"

This reverts commit e779884c71.

It breaks the current Android kernel abi.  It will be brought back at
the next KABI break update.

Bug: 161946584
Change-Id: Ic6ccde7b57e525a742602d783457c810a1ca0930
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2023-04-27 11:05:50 +00:00
committed by Matthias Männich
parent b55e0c7a6b
commit 8ea8ecbd12

View File

@@ -8796,23 +8796,16 @@ static void update_cpu_capacity(struct sched_domain *sd, int cpu)
* * Thermal pressure will impact all cpus in this perf domain
* equally.
*/
if (sched_energy_enabled()) {
if (static_branch_unlikely(&sched_asym_cpucapacity)) {
unsigned long inv_cap = capacity_orig - thermal_load_avg(rq);
struct perf_domain *pd;
struct perf_domain *pd = rcu_dereference(rq->rd->pd);
rcu_read_lock();
pd = rcu_dereference(rq->rd->pd);
rq->cpu_capacity_inverted = 0;
for (; pd; pd = pd->next) {
struct cpumask *pd_span = perf_domain_span(pd);
unsigned long pd_cap_orig, pd_cap;
/* We can't be inverted against our own pd */
if (cpumask_test_cpu(cpu_of(rq), pd_span))
continue;
cpu = cpumask_any(pd_span);
pd_cap_orig = arch_scale_cpu_capacity(cpu);
@@ -8837,8 +8830,6 @@ static void update_cpu_capacity(struct sched_domain *sd, int cpu)
break;
}
}
rcu_read_unlock();
}
trace_sched_cpu_capacity_tp(rq);