Re: [PATCH v2] sched/deadline: Make dl-server nohz full aware
From: Valentin Schneider
Date: Fri May 15 2026 - 12:11:25 EST
On 13/05/26 11:13, Juri Lelli wrote:
> The dl_server_timer() originally caused spurious IPIs on nohz_full
> cores, breaking isolation guarantees. While such IPIs cannot be observed
> on recent kernels, dl-server timers for tick-stopped isolated CPUs still
> fire unnecessarily on housekeeping cores.
>
> The problem is that dl-servers are not coordinated with nohz_full tick
> state. Even when the tick stops on an isolated CPU, its dl-server timer
> continues to fire on housekeeping, wasting cycles and potentially
> affecting housekeeping CPU performance.
>
> Fix by managing servers in sched_can_stop_tick():
>
> - When RT tasks run with CFS/SCX tasks, start the appropriate server(s)
> and keep the tick running
> - When only RT tasks remain, stop all servers and allow tick to stop
> (except for >1 RR tasks which need the tick for round-robin)
> - When only CFS/SCX tasks remain, stop all servers before stopping tick
>
> Introduce dl_servers_stop_all() to reduce duplication and abstract
> server management from core.c. Unify RT handling into one block that
> handles both RR and FIFO cases.
>
> Note on SCX: While SCX is incompatible with isolcpus=domain, it does
> support nohz_full. The ext_server handling in this patch targets
> nohz_full configurations without domain isolation.
>
> Fixes: 557a6bfc662c ("sched/fair: Add trivial fair server")
> Reported-by: David Haufe <dhaufe@xxxxxxxxxxxxxxxxxx>
> Closes: https://lore.kernel.org/lkml/CAKJHwtOw_G67edzuHVtL1xC5Vyt6StcZzihtDd0yaKudW=rwVw@xxxxxxxxxxxxxx
> Signed-off-by: Juri Lelli <juri.lelli@xxxxxxxxxx>
Reviewed-by: Valentin Schneider <vschneid@xxxxxxxxxx>