* [PATCH] sched/deadline: check start_dl_timer expiry with ktime_before()
@ 2026-08-16 3:26 Liang Hao
2026-08-18 11:55 ` Juri Lelli
0 siblings, 1 reply; 2+ messages in thread
From: Liang Hao @ 2026-08-16 3:26 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli
Cc: Vincent Guittot, Dietmar Eggemann, Steven Rostedt, Ben Segall,
Mel Gorman, Valentin Schneider, K Prateek Nayak, linux-kernel,
Liang Hao
Replace ktime_us_delta() < 0 with ktime_before() so the past-expiry
test uses the same resolution as act/now.
Signed-off-by: Liang Hao <haohlliang@gmail.com>
---
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 c3e38d4f3365..e6b69140ae1a 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1097,7 +1097,7 @@ static int start_dl_timer(struct sched_dl_entity *dl_se)
* chosen as the deadline is too small, don't even try to
* start the timer in the past!
*/
- if (ktime_us_delta(act, now) < 0)
+ if (ktime_before(act, now))
return 0;
/*
--
2.50.1 (Apple Git-155)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sched/deadline: check start_dl_timer expiry with ktime_before()
2026-08-16 3:26 [PATCH] sched/deadline: check start_dl_timer expiry with ktime_before() Liang Hao
@ 2026-08-18 11:55 ` Juri Lelli
0 siblings, 0 replies; 2+ messages in thread
From: Juri Lelli @ 2026-08-18 11:55 UTC (permalink / raw)
To: Liang Hao
Cc: Ingo Molnar, Peter Zijlstra, Vincent Guittot, Dietmar Eggemann,
Steven Rostedt, Ben Segall, Mel Gorman, Valentin Schneider,
K Prateek Nayak, linux-kernel
Hello,
On 16/08/26 11:26, Liang Hao wrote:
> Replace ktime_us_delta() < 0 with ktime_before() so the past-expiry
> test uses the same resolution as act/now.
>
> Signed-off-by: Liang Hao <haohlliang@gmail.com>
Looks good to me.
Acked-by: Juri Lelli <juri.lelli@redhat.com>
Thanks,
Juri
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-18 11:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-16 3:26 [PATCH] sched/deadline: check start_dl_timer expiry with ktime_before() Liang Hao
2026-08-18 11:55 ` Juri Lelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®