Re: [PATCH -v2 02/18] sched/fair: Add comment to calc_cfs_shares()

From: Morten Rasmussen
Date: Fri Sep 29 2017 - 09:03:47 EST


On Fri, Sep 29, 2017 at 01:35:00PM +0200, Peter Zijlstra wrote:
> On Thu, Sep 28, 2017 at 11:03:03AM +0100, Morten Rasmussen wrote:
> > IIUC, if grq->avg.load_avg > grq->load.weight, i.e. you have blocked
> > tasks, you can end up with underestimating the ge->load.weight for some
> > of the group entities lead to \Sum ge->load.weight < tg->weight.
>
> Ah yes, you're right. However, if you look at the end of the series we
> actually end up with using:
>
> max(grq->load.weight, grq->avg.load_avg)
>
> Which I suppose makes it true again.

Yes, with the next patch in the series, underestimation is no longer
possible.