sched/walt: avoid halted cpus in walt_find_energy_efficient_cpu

select_task_rq_fair invokes the select_task_rq_fair hook, which
ultimately invokes walt_find_energy_aware_cpu for cfs tasks. This
can return a cpu that is halted.

Update the one remaining case that can cause feec to return a
halted cpu.

Change-Id: Ic97345764ad8be1060868414869dc0e455f4bc54
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
This commit is contained in:
Stephen Dickey 2021-12-15 13:27:40 -08:00 committed by Rishabh Bhatnagar
parent 612b4f86c1
commit 324d02c0c5

View File

@ -788,8 +788,8 @@ int walt_find_energy_efficient_cpu(struct task_struct *p, int prev_cpu,
if (sync && (need_idle || (is_rtg && curr_is_rtg)))
sync = 0;
if (sysctl_sched_sync_hint_enable && sync
&& bias_to_this_cpu(p, cpu, start_cpu)) {
if (sysctl_sched_sync_hint_enable && sync &&
bias_to_this_cpu(p, cpu, start_cpu) && !cpu_halted(cpu)) {
best_energy_cpu = cpu;
fbt_env.fastpath = SYNC_WAKEUP;
goto done;