Re: [PATCH v2] sched/deadline: Make dl-server nohz full aware

From: Frederic Weisbecker

Date: Mon Oct 05 2026 - 10:33:07 EST


Le Thu, Oct 01, 2026 at 04:27:35PM +0200, Peter Zijlstra a écrit :
> On Wed, May 13, 2026 at 11:13:03AM +0200, 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>
> > ---
>
> I was most confused with this IPI talk, since dl-server are strictly
> per-cpu and was thinking you must be meaning timer interrupts.
>
> But AFAICT the normal dl timers are ABS_HARD, and !PINNED, so the whole
> NOHZ_FULL muck will move them around for no win. Oh well. Do we want the
> below?

Well, more or less, non pinned hrtimers don't move as easily as non pinned
jiffies timers. But yes.

>
> Anyway, yes, I think this is more or less the best we can hope for. In
> the down-thread case where someone is running both FIFO and CFS tasks,
> they get to keep the pieces, since that is violating NOHZ_FULL premise
> anyway.

Exactly.

Thanks.

--
Frederic Weisbecker
SUSE Labs