[PATCH v4 0/1] hrtimer: More fixes for handling of timer slack of rt tasks
From: Felix Moessbauer
Date: Wed Aug 14 2024 - 08:11:17 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 v3:
- short circuit on timerslack=0 in select_estimate_accuracy. This avoids
useless computations
- add explanation to the commit message why we ignore setting the
timerslack on RT tasks
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
v3 discussion: https://lore.kernel.org/lkml/20240813072953.209119-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 | 11 ++++-------
kernel/sched/syscalls.c | 8 ++++++++
kernel/sys.c | 2 ++
kernel/time/hrtimer.c | 18 +++---------------
5 files changed, 22 insertions(+), 26 deletions(-)
--
2.39.2