[PATCH v3 0/1] hrtimer: More fixes for handling of timer slack of rt tasks

From: Felix Moessbauer
Date: Tue Aug 13 2024 - 03:30:27 EST


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. It does so by removing all special
handling of timerslack on RT tasks by instead setting the timerslack to 0 when
switching to an RT scheduling policy.

Changes since v2:

- complete re-design of approach (as proposed by Thomas Gleixner): Instead of
overwriting the timerslack in the hrtimer setup path, we now set the timerslack
to 0 when switching to an RT scheduling policy.

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@xxxxxxxxxxx
- 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@xxxxxxxxxxx
v2 discussion: https://lore.kernel.org/lkml/20240805140930.29462-1-felix.moessbauer@xxxxxxxxxxx

Best regards,
Felix Moessbauer
Siemens AG

Felix Moessbauer (1):
hrtimer: use and report correct timerslack values for realtime tasks

fs/proc/base.c | 9 +++++----
fs/select.c | 12 +++---------
kernel/sched/syscalls.c | 8 ++++++++
kernel/sys.c | 2 ++
kernel/time/hrtimer.c | 18 +++---------------
5 files changed, 21 insertions(+), 28 deletions(-)

--
2.39.2