sched/deadline: check start_dl_timer expiry with ktime_before()
PATCH 1/1 sched/deadline: check start_dl_timer expiry with ktime_before()
Replace ktime_us_delta() < 0 with ktime_before() so the past-expiry test uses the same resolution as act/now.
--- kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/deadline.c +1 -1
@@ -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 ;/*
Signature · 1 line
2.50.1 (Apple Git-155)
Hello,
Quoted 4 lines · Liang Hao
Replace
ktime_us_delta()< 0 withktime_before()so the past-expiry test uses the same resolution as act/now.Signed-off-by Liang Hao <[email protected]>
Looks good to me.
Thanks,
Juri
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 6c10af7c54434768127d80fac8a00b1c0f553344 Gitweb: https://git.kernel.org/tip/6c10af7c54434768127d80fac8a00b1c0f553344 Author: Liang Hao <[email protected]> AuthorDate: Sun, 16 Aug 2026 11:26:43 +08:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Wed, 02 Sep 2026 09:37:25 +02:00
sched/deadline: check start_dl_timer expiry with ktime_before()
Replace ktime_us_delta() < 0 with ktime_before() so the past-expiry test uses the same resolution as act/now.
--- kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/deadline.c +1 -1
@@ -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 ;/*
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: f549101187c875c2016072cadcb909d228532ae8 Gitweb: https://git.kernel.org/tip/f549101187c875c2016072cadcb909d228532ae8 Author: Liang Hao <[email protected]> AuthorDate: Sun, 16 Aug 2026 11:26:43 +08:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Wed, 02 Sep 2026 10:28:24 +02:00
sched/deadline: check start_dl_timer expiry with ktime_before()
Replace ktime_us_delta() < 0 with ktime_before() so the past-expiry test uses the same resolution as act/now.
--- kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/deadline.c +1 -1
@@ -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 ;/*