All of lore.kernel.org
 help / color / mirror / Atom feed
From: Atul Pant <quic_atulpant@quicinc.com>
To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	bristot@redhat.com, vschneid@redhat.com, rafael@kernel.org,
	daniel.lezcano@linaro.org
Cc: Atul Pant <quic_atulpant@quicinc.com>,
	kernel@quicinc.com, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: [RFC PATCH 1/2] sched/rt: Disable runtime accounting for idle threads with SCHED_FIFO policy
Date: Wed, 10 Apr 2024 10:24:16 +0530	[thread overview]
Message-ID: <20240410045417.3048209-2-quic_atulpant@quicinc.com> (raw)
In-Reply-To: <20240410045417.3048209-1-quic_atulpant@quicinc.com>

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


  reply	other threads:[~2024-04-10  4:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10  4:54 [RFC PATCH 0/2] Disable RT-throttling for idle-inject threads Atul Pant
2024-04-10  4:54 ` Atul Pant [this message]
2024-04-10  7:00   ` [RFC PATCH 1/2] sched/rt: Disable runtime accounting for idle threads with SCHED_FIFO policy Daniel Bristot de Oliveira
2024-04-10  4:54 ` [RFC PATCH 2/2] sched/idle: Add a description for play_idle_precise Atul Pant
2024-04-10  8:54 ` [RFC PATCH 0/2] Disable RT-throttling for idle-inject threads Peter Zijlstra
2024-04-10 11:29   ` Atul Kumar Pant
2024-04-10 11:46     ` Peter Zijlstra
2024-04-10 12:24       ` Daniel Bristot de Oliveira
2024-04-10 13:29         ` Vincent Guittot
2024-04-10 13:31 ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240410045417.3048209-2-quic_atulpant@quicinc.com \
    --to=quic_atulpant@quicinc.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kernel@quicinc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.