Re: [PATCH 06/14] sched_ext: Add a DL server for sched_ext tasks
From: Juri Lelli
Date: Mon Oct 20 2025 - 10:09:36 EST
On 20/10/25 15:50, Andrea Righi wrote:
> Hi Juri,
>
> On Mon, Oct 20, 2025 at 01:58:50PM +0200, Juri Lelli wrote:
> > Hi!
> >
> > On 17/10/25 11:25, Andrea Righi wrote:
...
> > > @@ -1487,6 +1499,11 @@ static bool dequeue_task_scx(struct rq *rq, struct task_struct *p, int deq_flags
> > > sub_nr_running(rq, 1);
> > >
> > > dispatch_dequeue(rq, p);
> > > +
> > > + /* Stop the server if this was the last task */
> > > + if (rq->scx.nr_running == 0)
> > > + dl_server_stop(&rq->ext_server);
> > > +
> >
> > Do we want to use the delayed stop behavior for scx-server as we have
> > for fair-server? Wonder if it's a matter of removing this explicit stop
> > and wait for a full period to elapse as we do for fair. It should reduce
> > timer reprogramming overhead for scx as well.
>
> So, IIUC we could just remove this explicit dl_server_stop() and the server
> would naturally stop at the end of its current deadline period, if there
> are still no runnable tasks, right?
Right, that is what I'd expect. But this part tricked me several times
already, so I am not 100% certain (Peter please keep me honest :).
> In that case it's worth a try.