]> Gentwo Git Trees - linux/.git/commit
sched/deadline: Fix dl_server behaviour
authorPeter Zijlstra <peterz@infradead.org>
Wed, 17 Sep 2025 10:03:20 +0000 (12:03 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 25 Sep 2025 07:51:50 +0000 (09:51 +0200)
commita3a70caf7906708bf9bbc80018752a6b36543808
tree59039c38fa935f8a4c5fc9454ffa0d134cbb97cf
parent4ae8d9aa9f9dc7137ea5e564d79c5aa5af1bc45c
sched/deadline: Fix dl_server behaviour

John reported undesirable behaviour with the dl_server since commit:
cccb45d7c4295 ("sched/deadline: Less agressive dl_server handling").

When starving fair tasks on purpose (starting spinning FIFO tasks),
his fair workload, which often goes (briefly) idle, would delay fair
invocations for a second, running one invocation per second was both
unexpected and terribly slow.

The reason this happens is that when dl_se->server_pick_task() returns
NULL, indicating no runnable tasks, it would yield, pushing any later
jobs out a whole period (1 second).

Instead simply stop the server. This should restore behaviour in that
a later wakeup (which restarts the server) will be able to continue
running (subject to the CBS wakeup rules).

Notably, this does not re-introduce the behaviour cccb45d7c4295 set
out to solve, any start/stop cycle is naturally throttled by the timer
period (no active cancel).

Fixes: cccb45d7c4295 ("sched/deadline: Less agressive dl_server handling")
Reported-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: John Stultz <jstultz@google.com>
include/linux/sched.h
kernel/sched/deadline.c
kernel/sched/sched.h