From 0d9c99093d5a7c2eb4bf1fb12639ad8c90067e85 Mon Sep 17 00:00:00 2001 From: Satya Durga Srinivasu Prabhala Date: Mon, 28 Mar 2022 15:58:38 -0700 Subject: [PATCH] sched/walt/rt: limit long running RT task detection to FIFO Right now, it is possible to detect the long running RT tasks false positively in scenarios where a DL or RR task could be running as well. The intention behind long running RT task detection is to catch any long running FIFO tasks. Update check to make sure RT arrival time is updated only for FIFO tasks to limit long running RT task detection. Change-Id: Ide59791b40acd5e9529af23217c16350278c5f60 Signed-off-by: Satya Durga Srinivasu Prabhala --- kernel/sched/walt/walt_rt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/sched/walt/walt_rt.c b/kernel/sched/walt/walt_rt.c index d4dd39edee5e..98f8974b8bba 100644 --- a/kernel/sched/walt/walt_rt.c +++ b/kernel/sched/walt/walt_rt.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2020-2022, The Linux Foundation. All rights reserved. + * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -19,7 +20,7 @@ void rt_task_arrival_marker(void *unused, bool preempt, { unsigned int cpu = raw_smp_processor_id(); - if (rt_task(next) && next != cpu_rq(cpu)->stop) + if (next->policy == SCHED_FIFO) per_cpu(rt_task_arrival_time, cpu) = rq_clock_task(this_rq()); else per_cpu(rt_task_arrival_time, cpu) = 0;