From: Daniel Bristot de Oliveira <bristot@redhat.com>
To: Atul Pant <quic_atulpant@quicinc.com>,
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,
vschneid@redhat.com, rafael@kernel.org,
daniel.lezcano@linaro.org
Cc: kernel@quicinc.com, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] sched/rt: Disable runtime accounting for idle threads with SCHED_FIFO policy
Date: Wed, 10 Apr 2024 09:00:23 +0200 [thread overview]
Message-ID: <7578e8f4-03ac-4234-90c3-0585af4eca4d@redhat.com> (raw)
In-Reply-To: <20240410045417.3048209-2-quic_atulpant@quicinc.com>
On 4/10/24 06:54, Atul Pant wrote:
> 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)) {
FYI, this will not be a problem with dl server because play_idle_precise()
disables preemption, so the dl server will not be scheduled until preempt_enable().
with the DL server, the time consumed as an rt task will not change the DL server
behavior because the logic inverts: it provides bandwidth for the fair
scheduler (instead of throttling the RT sched).
-- Daniel
> raw_spin_lock(&rt_rq->rt_runtime_lock);
> rt_rq->rt_time += delta_exec;
> exceeded = sched_rt_runtime_exceeded(rt_rq);
next prev parent reply other threads:[~2024-04-10 7:00 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 ` [RFC PATCH 1/2] sched/rt: Disable runtime accounting for idle threads with SCHED_FIFO policy Atul Pant
2024-04-10 7:00 ` Daniel Bristot de Oliveira [this message]
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=7578e8f4-03ac-4234-90c3-0585af4eca4d@redhat.com \
--to=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=quic_atulpant@quicinc.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®