sched/deadline: Initialize dl_servers after SMP
authorJuri Lelli <juri.lelli@redhat.com>
Fri, 27 Jun 2025 11:51:14 +0000 (13:51 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 14 Jul 2025 08:59:32 +0000 (10:59 +0200)
commit9f239df55546ee1d28f0976130136ffd1cad0fd7
treef1c2e95b8bcd581353fe2134503b1a5638e4ccff
parent2885daf47081dd1aaf1a588e9d001eb343df1f90
sched/deadline: Initialize dl_servers after SMP

dl-servers are currently initialized too early at boot when CPUs are not
fully up (only boot CPU is). This results in miscalculation of per
runqueue DEADLINE variables like extra_bw (which needs a stable CPU
count).

Move initialization of dl-servers later on after SMP has been
initialized and CPUs are all online, so that CPU count is stable and
DEADLINE variables can be computed correctly.

Fixes: d741f297bceaf ("sched/fair: Fair server interface")
Reported-by: Marcel Ziswiler <marcel.ziswiler@codethink.co.uk>
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Waiman Long <longman@redhat.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@codethink.co.uk> # nuc & rock5b
Link: https://lore.kernel.org/r/20250627115118.438797-2-juri.lelli@redhat.com
kernel/sched/core.c
kernel/sched/deadline.c
kernel/sched/sched.h