[tip: sched/core] sched/deadline: check start_dl_timer expiry with ktime_before()

tip-bot2 for Liang Hao posted 1 patch 3 weeks, 3 days ago
kernel/sched/deadline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[tip: sched/core] sched/deadline: check start_dl_timer expiry with ktime_before()
Posted by tip-bot2 for Liang Hao 3 weeks, 3 days ago
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 <haohlliang@gmail.com>
AuthorDate:    Sun, 16 Aug 2026 11:26:43 +08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
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.

Signed-off-by: Liang Hao <haohlliang@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Juri Lelli <juri.lelli@redhat.com>
Link: https://patch.msgid.link/20260816032643.44969-1-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 0663c00..de6a361 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;
 
 	/*