mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Revert "Revert "sched/uclamp: Fix a uninitialized variable warnings""
This reverts commit be0a0feb8e627f2f2f5324c65e5f91f921d4c1b8. It was perserving the ABI, but that is not needed anymore at this point in time. Change-Id: I8913de3e6e83876a2b2ed4460c935c3adb2a0721 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
Carlos Llamas
parent
745bc5edc0
commit
60e138c123
@@ -7099,14 +7099,16 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy
|
||||
target_cap = boosted ? 0 : ULONG_MAX;
|
||||
|
||||
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 rq_util_min, rq_util_max;
|
||||
unsigned long util_min, util_max;
|
||||
bool compute_prev_delta = false;
|
||||
unsigned long base_energy_pd;
|
||||
int max_spare_cap_cpu = -1;
|
||||
|
||||
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))
|
||||
continue;
|
||||
|
||||
@@ -7122,24 +7124,19 @@ 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
|
||||
* aligned with sched_cpu_util().
|
||||
*/
|
||||
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
|
||||
* the clamp() part. Ie: apply max aggregation
|
||||
* only. util_fits_cpu() logic requires to
|
||||
* operate on non clamped util but must use the
|
||||
* max-aggregated uclamp_{min, max}.
|
||||
*/
|
||||
rq_util_min = uclamp_rq_get(cpu_rq(cpu), UCLAMP_MIN);
|
||||
rq_util_max = uclamp_rq_get(cpu_rq(cpu), UCLAMP_MAX);
|
||||
if (uclamp_is_used() && !uclamp_rq_is_idle(rq)) {
|
||||
/*
|
||||
* Open code uclamp_rq_util_with() except for
|
||||
* the clamp() part. Ie: apply max aggregation
|
||||
* only. util_fits_cpu() logic requires to
|
||||
* operate on non clamped util but must use the
|
||||
* max-aggregated uclamp_{min, max}.
|
||||
*/
|
||||
rq_util_min = uclamp_rq_get(rq, UCLAMP_MIN);
|
||||
rq_util_max = uclamp_rq_get(rq, UCLAMP_MAX);
|
||||
|
||||
util_min = max(rq_util_min, p_util_min);
|
||||
util_max = max(rq_util_max, p_util_max);
|
||||
}
|
||||
util_min = max(rq_util_min, p_util_min);
|
||||
util_max = max(rq_util_max, p_util_max);
|
||||
}
|
||||
if (!util_fits_cpu(util, util_min, util_max, cpu))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user