sched/walt/rt: check halted flag for rt task wakeups

The halted flag must be checked when performing a wakeup of
an rt task, to prevent tasks from running on halted CPUs.

Change-Id: Ib4a5cff48611abb0d1f71fc10be45439d2b7dd64
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
This commit is contained in:
Stephen Dickey 2021-11-12 16:27:10 -08:00 committed by Rishabh Bhatnagar
parent 7a3fe1d52e
commit ba4ec7d486

View File

@ -41,6 +41,9 @@ static void walt_rt_energy_aware_wake_cpu(void *unused, struct task_struct *task
if (!cpu_active(cpu))
continue;
if (cpu_halted(cpu))
continue;
if (sched_cpu_high_irqload(cpu))
continue;
@ -162,7 +165,7 @@ static void walt_select_task_rq_rt(void *unused, struct task_struct *task, int c
/*
* Respect the sync flag as long as the task can run on this CPU.
*/
if (sysctl_sched_sync_hint_enable && cpu_active(this_cpu) &&
if (sysctl_sched_sync_hint_enable && cpu_active(this_cpu) && !cpu_halted(this_cpu) &&
cpumask_test_cpu(this_cpu, task->cpus_ptr) &&
walt_should_honor_rt_sync(this_cpu_rq, task, sync)) {
*new_cpu = this_cpu;