Re: [PATCH 4/8] sched/eevdf: Decay positive lag of sleeping entities

From: Peter Zijlstra

Date: Tue Sep 22 2026 - 06:42:24 EST


On Tue, Sep 22, 2026 at 12:02:33PM +0200, Peter Zijlstra wrote:
> On Mon, Sep 21, 2026 at 05:22:34PM +0200, Vincent Guittot wrote:

> > +
> > + vlag -= calc_delta_fair(delta_exec, se);
>
> Should this not be 'W+w' at the very least?, ideally it would be the
> complete sum of all decaying weight rather than just 'w', but that might
> be a tad tricky.

One crazy way would be to add a second tree, then on dequeu, set
sched_delayed (to 2 or whatnot) and move it into the second tree (rather
than keep it in the normal tree).

Then have update_curr() or thereabout advance this decay tree's zero-lag
point (rather than moving each individual vruntime entity) at W+Wd rate
and check if the leftmost entities have 'aged' out; if so, reset their
vlag and properly dequeue them.

If they get woken in the interim, compute their new lag based on their
relative position to the zero lag of the decay tree.

Definitely non-trivial, and I'm not at all sure its worth it. But it
should sorta do the right thing.

Juri, did not the BFQ folks also have something like that at some point?