From ba4ec7d4861e91229c53331aa8c28cbda24ad63a Mon Sep 17 00:00:00 2001 From: Stephen Dickey Date: Fri, 12 Nov 2021 16:27:10 -0800 Subject: [PATCH] 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 --- kernel/sched/walt/walt_rt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/sched/walt/walt_rt.c b/kernel/sched/walt/walt_rt.c index 386266fed844..07afcb39fdc6 100644 --- a/kernel/sched/walt/walt_rt.c +++ b/kernel/sched/walt/walt_rt.c @@ -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;