[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <44ca58cf-3daa-bec5-2c52-eb5a6dd305b9@arm.com>
Date: Wed, 6 Apr 2022 19:25:46 +0200
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>,
彭志刚 <zgpeng.linux@...il.com>
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
rostedt@...dmis.org, Benjamin Segall <bsegall@...gle.com>,
mgorman@...e.de, bristot@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched/fair: Return the busiest group only if imbalance is
meaningful
On 06/04/2022 17:33, Vincent Guittot wrote:
> On Wed, 6 Apr 2022 at 17:07, 彭志刚 <zgpeng.linux@...il.com> wrote:
[...]
> I think that this case should be covered by an additional test in
> calculate_imbalance because we should not try to pull load in groupA
> if it's already above the average load. Something like below should
> cover this
>
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -9469,6 +9469,16 @@ static inline void calculate_imbalance(struct
> lb_env *env, struct sd_lb_stats *s
>
> sds->avg_load = (sds->total_load * SCHED_CAPACITY_SCALE) /
> sds->total_capacity;
> +
> + /*
> + * Don't pull any tasks if this group is already above the
> + * domain average load.
> + */
> + if (local->avg_load >= sds->avg_load) {
> + env->imbalance = 0;
> + return;
> + }
> +
LGTM. Like for the `local->group_type == group_overloaded` case in
find_busiest_group() where we force `goto out_balanced`.
[...]
Powered by blists - more mailing lists