Re: [PATCH 01/15] sched/fair: Add avg_vruntime

From: Peter Zijlstra
Date: Wed Oct 11 2023 - 09:09:52 EST


On Wed, Oct 11, 2023 at 09:30:01AM +0200, Peter Zijlstra wrote:
> On Wed, Oct 11, 2023 at 12:15:28PM +0800, Abel Wu wrote:
> > On 5/31/23 7:58 PM, Peter Zijlstra wrote:
> > > +/*
> > > + * Compute virtual time from the per-task service numbers:
> > > + *
> > > + * Fair schedulers conserve lag:
> > > + *
> > > + * \Sum lag_i = 0
> > > + *
> > > + * Where lag_i is given by:
> > > + *
> > > + * lag_i = S - s_i = w_i * (V - v_i)
> >
> > Since the ideal service time S is task-specific, should this be:
> >
> > lag_i = S_i - s_i = w_i * (V - v_i)
>

Yes, it should be. Clearly I was delusional this morning.