Re: [PATCH v2 3/3] sched/fair: fix unnecessary increase of balance interval

From: Vincent Guittot
Date: Wed Dec 19 2018 - 11:54:26 EST


On Wed, 19 Dec 2018 at 16:54, Valentin Schneider
<valentin.schneider@xxxxxxx> wrote:
>
> On 19/12/2018 13:29, Vincent Guittot wrote:
> [...]
> >> My point is that AFAICT the LBF_ALL_PINNED flag would cover all the cases
> >> we care about, although the one you're mentioning is the only one I can
> >> think of. In that case LBF_ALL_PINNED would never be cleared, so when we do
> >> the active balance we'd know it's because all other tasks were pinned so
> >> we should probably increase the interval (see last snippet I sent).
> >
> > There are probably several other UC than the one mentioned below as
> > tasks can be discarded for several reasons.
> > So instead of changing for all UC by default, i would prefer only
> > change for those for which we know it's safe
>
> I get your point. Thing is, I've stared at the code for a while and
> couldn't find any other usecase where checking LBF_ALL_PINNED wouldn't
> suffice.

The point is that LBF_ALL_PINNED flag is not set otherwise we would
have jump to out_*_pinned
But conditions are similar

>
> It would be nice convince ourselves it is indeed enough (or not, but then
> we should be sure of it rather than base ourselves on assumptions), because
> then we can have just a simple condition rather than something that
> introduces active balance categories.

this can be part of the larger rework that Peter asked few days ago