Commit 14a85705 authored by Peter Zijlstra's avatar Peter Zijlstra
Browse files

sched/deadline: Use revised wakeup rule for dl_server



John noted that commit 11513542 ("sched/deadline: Fix 'stuck' dl_server")
unfixed the issue from commit a3a70caf ("sched/deadline: Fix dl_server
behaviour").

The issue in commit 11513542 was for wakeups of the server after the
deadline; in which case you *have* to start a new period. The case for
a3a70caf is wakeups before the deadline.

Now, because the server is effectively running a least-laxity policy, it means
that any wakeup during the runnable phase means dl_entity_overflow() will be
true. This means we need to adjust the runtime to allow it to still run until
the existing deadline expires.

Use the revised wakeup rule for dl_defer entities.

Fixes: 11513542 ("sched/deadline: Fix 'stuck' dl_server")
Reported-by: default avatarJohn Stultz <jstultz@google.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarJuri Lelli <juri.lelli@redhat.com>
Tested-by: default avatarJohn Stultz <jstultz@google.com>
Link: https://patch.msgid.link/20260404102244.GB22575@noisy.programming.kicks-ass.net
parent 591cd656
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1027,7 +1027,7 @@ static void update_dl_entity(struct sched_dl_entity *dl_se)
	if (dl_time_before(dl_se->deadline, rq_clock(rq)) ||
	    dl_entity_overflow(dl_se, rq_clock(rq))) {

		if (unlikely(!dl_is_implicit(dl_se) &&
		if (unlikely((!dl_is_implicit(dl_se) || dl_se->dl_defer) &&
			     !dl_time_before(dl_se->deadline, rq_clock(rq)) &&
			     !is_dl_boosted(dl_se))) {
			update_dl_revised_wakeup(dl_se, rq);