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

From: Peter Zijlstra

Date: Thu Oct 01 2026 - 12:18:14 EST


On Thu, Oct 01, 2026 at 05:25:59PM +0200, Juri Lelli wrote:
> On 01/10/26 16:33, Peter Zijlstra wrote:
> > On Thu, Oct 01, 2026 at 04:27:36PM +0200, Peter Zijlstra wrote:
> >
> > > > bool sched_can_stop_tick(struct rq *rq)
> > > > {
> > > > /* Deadline tasks, even if single, need the tick */
> > > > if (rq->dl.dl_nr_running)
> > > > return false;
> > > >
> > > > /*
> > > > + * If there are RT tasks, we may need the tick (for >1 RR tasks),
> > > > + * but we must also service lower-priority CFS/SCX tasks via dl-servers.
> > > > */
> > > > + if (rq->rt.rt_nr_running) {
> > > > + bool cfs_or_scx_queued = false;
> > > > +
> > > > + if (rq->cfs.h_nr_queued) {
> > > > + dl_server_start(&rq->fair_server);
> > > > + cfs_or_scx_queued = true;
> > > > + }
> > > > +#ifdef CONFIG_SCHED_CLASS_EXT
> > > > + if (rq->scx.nr_running) {
> > > > + dl_server_start(&rq->ext_server);
> > > > + cfs_or_scx_queued = true;
> > > > + }
> > > > +#endif
> > > > + if (cfs_or_scx_queued)
> > > > return false;
> >
> > What the purpose of this boolean, both true assignments above can simply
> > be return false, no?
>
> But we won't start the ext_server, even if EXT tasks are present, if we
> return false in case CFS tasks are present.

Ah, see, I need a break ;-)

/me stomps off to brew tea...