Re: [RFC][PATCH] sched/deadline: Fix dl_server getting stuck, allowing cpu starvation
From: Juri Lelli
Date: Thu Sep 18 2025 - 04:37:22 EST
On 17/09/25 19:30, Peter Zijlstra wrote:
> On Wed, Sep 17, 2025 at 03:56:20PM +0200, Juri Lelli wrote:
>
> > > + * By stopping at this point the dl_server retains bandwidth, which, if a new
> > > + * task wakes up imminently (starting the server again), can be used --
> > > + * subject to CBS wakeup rules -- without having to wait for the next period.
> >
> > In both cases we still defer until either the new period or the current
> > 0-laxity, right?
> >
> > The stop cleans all the flags, so subsequent start calls
> > enqueue(ENQUEUE_WAKEUP) -> update_dl_entity() which sets dl_throttled
> > and dl_defer_armed in both cases and then we start_dl_timer (defer
> > timer) after it (without enqueueing right away).
> >
> > Or maybe I am still a bit lost. :)
>
> The way I read it earlier today:
>
> dl_server_start()
> enqueue_dl_entity(WAKEUP)
> if (WAKEUP)
> task_contending();
> update_dl_entity()
> dl_entity_overflows() := true
> update_dl_revised_wakeup();
>
> In that case, it is possible to continue running with a slight
> adjustment to the runtime (it gets scaled back to account for 'lost'
> time or somesuch IIRC).
>
Hummm, but this is for !implicit (dl_deadline != dl_period) tasks, is
it? And dl-servers are implicit.