[PATCH] sched/deadline: Do not start hrtick if its disabled for DL
From: Joel Fernandes (Google)
Date: Mon Nov 11 2024 - 20:23:08 EST
Fix an issue where high-resolution timers causes aggressive preemptions,
leading to increased idle times in CFS tasks (which are inside the DL
server). The problem was traced to improper usage of hrtick_enabled(),
which could start high-resolution ticks unexpectedly causing repeated
preemptions.
The fix replaces this call with hrtick_enabled_dl(), aligning it with
scheduler feature checks.
Reported-by: Aashish Sharma <shraash@xxxxxxxxxx>
Reported-by: Vineeth Pillai <vineeth@xxxxxxxxxxxxxxx>
Signed-off-by: Joel Fernandes (Google) <joel@xxxxxxxxxxxxxxxxx>
---
kernel/sched/deadline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index b216e6deeac4..d46502b9ce58 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2121,7 +2121,7 @@ static struct task_struct *pick_next_task_dl(struct rq *rq)
if (!p->dl_server)
set_next_task_dl(rq, p, true);
- if (hrtick_enabled(rq))
+ if (hrtick_enabled_dl(rq))
start_hrtick_dl(rq, &p->dl);
return p;
--
2.47.0.277.g8800431eea-goog