Re: [PATCH 3/5] sched/fair: rework load_balance

From: Vincent Guittot
Date: Fri Jul 19 2019 - 09:57:22 EST


On Fri, 19 Jul 2019 at 15:06, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Fri, Jul 19, 2019 at 09:58:23AM +0200, Vincent Guittot wrote:
> > @@ -7887,7 +7908,7 @@ static inline int sg_imbalanced(struct sched_group *group)
> > static inline bool
> > group_has_capacity(struct lb_env *env, struct sg_lb_stats *sgs)
> > {
> > - if (sgs->sum_h_nr_running < sgs->group_weight)
> > + if (sgs->sum_nr_running < sgs->group_weight)
> > return true;
> >
> > if ((sgs->group_capacity * 100) >
> > @@ -7908,7 +7929,7 @@ group_has_capacity(struct lb_env *env, struct sg_lb_stats *sgs)
> > static inline bool
> > group_is_overloaded(struct lb_env *env, struct sg_lb_stats *sgs)
> > {
> > - if (sgs->sum_h_nr_running <= sgs->group_weight)
> > + if (sgs->sum_nr_running <= sgs->group_weight)
> > return false;
> >
> > if ((sgs->group_capacity * 100) <
>
> I suspect this is a change you can pull out into a separate patch after
> the big change. Yes it makes sense to account the other class' task
> presence, but I don't think it is strictly required to be in this patch.

yes