Revert "sched/uclamp: Fix a uninitialized variable warnings"
This reverts commit 89ad8a672f.
It breaks the Android kernel abi, so revert it. If it needs to come
back later, it can do so in an abi-safe way.
Bug: 161946584
Cc: Qais Yousef <qyousef@google.com>
Change-Id: I5e23eb845f1e2558992cdfe828e9ebcf32055a52
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -6913,9 +6913,9 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy
|
|||||||
target_cap = boosted ? 0 : ULONG_MAX;
|
target_cap = boosted ? 0 : ULONG_MAX;
|
||||||
|
|
||||||
for (; pd; pd = pd->next) {
|
for (; pd; pd = pd->next) {
|
||||||
unsigned long util_min = p_util_min, util_max = p_util_max;
|
|
||||||
unsigned long cur_delta, spare_cap, max_spare_cap = 0;
|
unsigned long cur_delta, spare_cap, max_spare_cap = 0;
|
||||||
unsigned long rq_util_min, rq_util_max;
|
unsigned long rq_util_min, rq_util_max;
|
||||||
|
unsigned long util_min, util_max;
|
||||||
unsigned long base_energy_pd;
|
unsigned long base_energy_pd;
|
||||||
int max_spare_cap_cpu = -1;
|
int max_spare_cap_cpu = -1;
|
||||||
|
|
||||||
@@ -6924,8 +6924,6 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy
|
|||||||
base_energy += base_energy_pd;
|
base_energy += base_energy_pd;
|
||||||
|
|
||||||
for_each_cpu_and(cpu, perf_domain_span(pd), sched_domain_span(sd)) {
|
for_each_cpu_and(cpu, perf_domain_span(pd), sched_domain_span(sd)) {
|
||||||
struct rq *rq = cpu_rq(cpu);
|
|
||||||
|
|
||||||
if (!cpumask_test_cpu(cpu, p->cpus_ptr))
|
if (!cpumask_test_cpu(cpu, p->cpus_ptr))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -6941,7 +6939,11 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy
|
|||||||
* much capacity we can get out of the CPU; this is
|
* much capacity we can get out of the CPU; this is
|
||||||
* aligned with schedutil_cpu_util().
|
* aligned with schedutil_cpu_util().
|
||||||
*/
|
*/
|
||||||
if (uclamp_is_used() && !uclamp_rq_is_idle(rq)) {
|
if (uclamp_is_used()) {
|
||||||
|
if (uclamp_rq_is_idle(cpu_rq(cpu))) {
|
||||||
|
util_min = p_util_min;
|
||||||
|
util_max = p_util_max;
|
||||||
|
} else {
|
||||||
/*
|
/*
|
||||||
* Open code uclamp_rq_util_with() except for
|
* Open code uclamp_rq_util_with() except for
|
||||||
* the clamp() part. Ie: apply max aggregation
|
* the clamp() part. Ie: apply max aggregation
|
||||||
@@ -6949,12 +6951,13 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy
|
|||||||
* operate on non clamped util but must use the
|
* operate on non clamped util but must use the
|
||||||
* max-aggregated uclamp_{min, max}.
|
* max-aggregated uclamp_{min, max}.
|
||||||
*/
|
*/
|
||||||
rq_util_min = uclamp_rq_get(rq, UCLAMP_MIN);
|
rq_util_min = uclamp_rq_get(cpu_rq(cpu), UCLAMP_MIN);
|
||||||
rq_util_max = uclamp_rq_get(rq, UCLAMP_MAX);
|
rq_util_max = uclamp_rq_get(cpu_rq(cpu), UCLAMP_MAX);
|
||||||
|
|
||||||
util_min = max(rq_util_min, p_util_min);
|
util_min = max(rq_util_min, p_util_min);
|
||||||
util_max = max(rq_util_max, p_util_max);
|
util_max = max(rq_util_max, p_util_max);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!util_fits_cpu(util, util_min, util_max, cpu))
|
if (!util_fits_cpu(util, util_min, util_max, cpu))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user