From: "MOESSBAUER, Felix" <felix.moessbauer@siemens.com>
To: "qyousef@layalina.io" <qyousef@layalina.io>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
"frederic@kernel.org" <frederic@kernel.org>,
"Kiszka, Jan" <jan.kiszka@siemens.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"bigeasy@linutronix.de" <bigeasy@linutronix.de>,
"anna-maria@linutronix.de" <anna-maria@linutronix.de>
Subject: Re: [PATCH v2 0/1] hrtimer: More fixes for handling of timer slack of rt tasks
Date: Fri, 9 Aug 2024 08:47:29 +0000 [thread overview]
Message-ID: <46ad86f8b1fc4fb5dbb3da8f6ab664f48955849f.camel@siemens.com> (raw)
In-Reply-To: <20240809013433.pazaymcdx37lhpau@airbuntu>
On Fri, 2024-08-09 at 02:34 +0100, Qais Yousef wrote:
> On 08/05/24 16:09, Felix Moessbauer wrote:
> > This series fixes the (hopefully) last location of an incorrectly
> > handled timer slack on rt tasks in hrtimer_start_range_ns(), which
> > was
> > uncovered by a userland change in glibc 2.33.
> >
> > Changes since v1:
> >
> > - drop patch "hrtimer: Document, that PI boosted tasks have no
> > timer slack", as
> > this behavior is incorrect and is already adressed in
> > 20240610192018.1567075-1-qyousef@layalina.io
>
> There was discussion about this hrtimer usage in earlier version if
> it helps to
> come up with a potentially better patch
Hi, Sebastian already pointed me to this thread.
When debugging my issue, I did not know about it but was scratching my
head if the behavior / usage of rt_task is actually correct.
The whole naming was quite confusing. Many thanks for cleaning that up.
>
>
> https://lore.kernel.org/lkml/20240521110035.KRIwllGe@linutronix.de/
>
> My patches got picked up by the way, you'd probably want to rebase
> and resend
> as now the function is named rt_or_dl_task_policy()
As we use rt_or_dl_task() in nanosleep, I'm wondering if we should use
the same in hrtimer_start_range_ns(). Is that because PI boosted tasks
need to acquire a lock which can only be a mutex_t or equivalent
sleeping lock on PREEMPT_RT?
Anyways, I'm thinking about getting rid of the policy based delta=0 and
just set the task->timer_slack_ns to 0 when changing the scheduling
policy (and changing it back to the default when reverting to
SCHED_OTHER). By that, we can get rid of the special handling and users
of the procfs would also see correct data in /timerslack_ns.
Felix
>
>
> Cheers
>
> --
> Qais Yousef
>
> > - use task_is_realtime() instead of rt_task()
> > - fix style of commit message
> >
> > v1 discussion:
> > https://lore.kernel.org/lkml/20240805124116.21394-1-felix.moessbauer@siemens.com
> >
> > Best regards,
> > Felix Moessbauer
> > Siemens AG
> >
> > Felix Moessbauer (1):
> > hrtimer: Ignore slack time for RT tasks in
> > hrtimer_start_range_ns()
> >
> > kernel/time/hrtimer.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > --
> > 2.39.2
> >
--
Siemens AG, Technology
Linux Expert Center
next prev parent reply other threads:[~2024-08-09 8:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 14:09 Felix Moessbauer
2024-08-05 14:09 ` [PATCH v2 1/1] hrtimer: Ignore slack time for RT tasks in hrtimer_start_range_ns() Felix Moessbauer
2024-08-09 1:34 ` [PATCH v2 0/1] hrtimer: More fixes for handling of timer slack of rt tasks Qais Yousef
2024-08-09 8:47 ` MOESSBAUER, Felix [this message]
2024-08-09 20:15 ` Thomas Gleixner
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=46ad86f8b1fc4fb5dbb3da8f6ab664f48955849f.camel@siemens.com \
--to=felix.moessbauer@siemens.com \
--cc=anna-maria@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=frederic@kernel.org \
--cc=jan.kiszka@siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=qyousef@layalina.io \
--cc=tglx@linutronix.de \
/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®