mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
Revert "Revert "sched/fair: Fixes for capacity inversion detection""
This reverts commit 937164e07b8e56fa2e34bf05ee956ac4fe6a6b47. It was perserving the ABI, but that is not needed anymore at this point in time. Change-Id: Ie7aaed3a99ce91258f7eae8683ea27b4d807b7b4 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
Carlos Llamas
parent
60e138c123
commit
dad20f7a85
@@ -8798,16 +8798,23 @@ static void update_cpu_capacity(struct sched_domain *sd, int cpu)
|
||||
* * Thermal pressure will impact all cpus in this perf domain
|
||||
* equally.
|
||||
*/
|
||||
if (static_branch_unlikely(&sched_asym_cpucapacity)) {
|
||||
if (sched_energy_enabled()) {
|
||||
unsigned long inv_cap = capacity_orig - thermal_load_avg(rq);
|
||||
struct perf_domain *pd = rcu_dereference(rq->rd->pd);
|
||||
struct perf_domain *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);
|
||||
|
||||
@@ -8832,6 +8839,8 @@ static void update_cpu_capacity(struct sched_domain *sd, int cpu)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
trace_sched_cpu_capacity_tp(rq);
|
||||
|
||||
Reference in New Issue
Block a user