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 <quic_satyap@quicinc.com>
This commit is contained in:
Satya Durga Srinivasu Prabhala 2022-03-28 15:58:38 -07:00 committed by Rishabh Bhatnagar
parent 9811092a16
commit 0d9c99093d

View File

@ -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 <trace/hooks/sched.h>
@ -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;