@@ -2073,7 +2073,7 @@ long hrtimer_nanosleep(ktime_t rqtp, const enum hrtimer_mode mode,
u64 slack;
slack = current->timer_slack_ns;
- if (realtime_task(current))
+ if (realtime_task_policy(current))
slack = 0;
hrtimer_init_sleeper_on_stack(&t, clockid, mode);
@@ -2278,7 +2278,7 @@ schedule_hrtimeout_range_clock(ktime_t *expires, u64 delta,
* Override any slack passed by the user if under
* rt contraints.
*/
- if (realtime_task(current))
+ if (realtime_task_policy(current))
delta = 0;
hrtimer_init_sleeper_on_stack(&t, clock_id, mode);
As Sebastian explained in [1], We need only look at the policy to decide if we need to remove the slack because PI-boosted tasks should not sleep. [1] https://lore.kernel.org/lkml/20240521110035.KRIwllGe@linutronix.de/ Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Qais Yousef <qyousef@layalina.io> --- kernel/time/hrtimer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)