lkml.org 
[lkml]   [2024]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 1/2] sched/rt: Disable runtime accounting for idle threads with SCHED_FIFO policy
Date
To prevent the throttling of RT idle threads, like the idle-inject
threads, skip accounting of runtime for these threads.

Signed-off-by: Atul Pant <quic_atulpant@quicinc.com>
---
kernel/sched/rt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 4ac36eb4cdee..d20999270e75 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1075,7 +1075,9 @@ static void update_curr_rt(struct rq *rq)
struct rt_rq *rt_rq = rt_rq_of_se(rt_se);
int exceeded;

- if (sched_rt_runtime(rt_rq) != RUNTIME_INF) {
+ if (sched_rt_runtime(rt_rq) != RUNTIME_INF &&
+ !(curr->policy == SCHED_FIFO &&
+ curr->flags & PF_IDLE)) {
raw_spin_lock(&rt_rq->rt_runtime_lock);
rt_rq->rt_time += delta_exec;
exceeded = sched_rt_runtime_exceeded(rt_rq);
--
2.25.1

\
 
 \ /
  Last update: 2024-05-27 16:32    [W:0.137 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site