Skip to contentSkip to conversation

sched/deadline: Use hrtick_enabled_dl() before start_hrtick_dl()

PATCH Applied Phil Auld 3 participants 3 messages Oct 4, 2024 – Oct 12, 2024 Scheduler

lore
Share & tools
lore

Phil Auld

author
#0 lore raw

PATCH 1/1 sched/deadline: Use hrtick_enabled_dl() before start_hrtick_dl()

The deadline server code moved one of the start_hrtick_dl() calls but dropped the dl specific hrtick_enabled check. This causes hrticks to get armed even when sched_feat(HRTICK_DL) is false. Fix it.

Fixes 63ba8422f876 ("sched/deadline: Introduce deadline servers")
Cc Juri Lelli <[email protected]>
Cc Valentin Schneider <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Dietmar Eggemann <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 kernel/sched/deadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/deadline.c +1 -1
index 9ce93d0bf452..be1b917dc8ce 100644
@@ -2385,7 +2385,7 @@ static void set_next_task_dl(struct rq *rq, struct task_struct *p, bool first)
 
 	deadline_queue_push_tasks(rq);
 
-	if (hrtick_enabled(rq))
+	if (hrtick_enabled_dl(rq))
 		start_hrtick_dl(rq, &p->dl);
 }
 
Signature · 1 line
2.46.1
maintainer Acked-by on v1 1/1
#1 lore raw

Hi Phil,

Quoted 4 lines · Phil Auld

The deadline server code moved one of the start_hrtick_dl() calls but dropped the dl specific hrtick_enabled check. This causes hrticks to get armed even when sched_feat(HRTICK_DL) is false. Fix it.

Quoted 8 lines
Fixes 63ba8422f876 ("sched/deadline: Introduce deadline servers")
Cc Juri Lelli <[email protected]>
Cc Valentin Schneider <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Dietmar Eggemann <[email protected]>
Cc Steven Rostedt <[email protected]>

Indeed. Good catch!

Best,
Juri

merge bot Applied
#2 lore raw
In reply to Phil Auld
The following commit has been merged into the sched/urgent branch of tip:

The following commit has been merged into the sched/urgent branch of tip:

Commit-ID:     d16b7eb6f523eeac3cff13001ef2a59cd462aa73
Gitweb:        https://git.kernel.org/tip/d16b7eb6f523eeac3cff13001ef2a59cd462aa73
Author:        Phil Auld <[email protected]>
AuthorDate:    Fri, 04 Oct 2024 08:37:29 -04:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Fri, 11 Oct 2024 10:49:32 +02:00

sched/deadline: Use hrtick_enabled_dl() before start_hrtick_dl()

The deadline server code moved one of the start_hrtick_dl() calls but dropped the dl specific hrtick_enabled check. This causes hrticks to get armed even when sched_feat(HRTICK_DL) is false. Fix it.

Fixes 63ba8422f876 ("sched/deadline: Introduce deadline servers")
---
 kernel/sched/deadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/deadline.c +1 -1
index 9ce93d0..be1b917 100644
@@ -2385,7 +2385,7 @@ static void set_next_task_dl(struct rq *rq, struct task_struct *p, bool first)
 
 	deadline_queue_push_tasks(rq);
 
-	if (hrtick_enabled(rq))
+	if (hrtick_enabled_dl(rq))
 		start_hrtick_dl(rq, &p->dl);
 }