Re: [PATCH 1/2] sched/fair: Filter out locally-unsolvable misfit imbalances

From: Valentin Schneider
Date: Mon Apr 19 2021 - 13:13:24 EST


On 16/04/21 15:29, Vincent Guittot wrote:
> On Thu, 15 Apr 2021 at 19:58, Valentin Schneider
> <valentin.schneider@xxxxxxx> wrote:
>> @@ -9441,8 +9465,8 @@ static struct rq *find_busiest_queue(struct lb_env *env,
>> * average load.
>> */
>> if (env->sd->flags & SD_ASYM_CPUCAPACITY &&
>> - !capacity_greater(capacity_of(env->dst_cpu), capacity) &&
>> - nr_running == 1)
>> + env->src_grp_type <= group_fully_busy &&
>> + !capacity_greater(capacity_of(env->dst_cpu), capacity))
>> continue;
>>
>> switch (env->migration_type) {
>> @@ -9504,15 +9528,18 @@ static struct rq *find_busiest_queue(struct lb_env *env,
>> case migrate_misfit:
>> /*
>> * For ASYM_CPUCAPACITY domains with misfit tasks we
>> - * simply seek the "biggest" misfit task.
>> + * simply seek the "biggest" misfit task we can
>> + * accommodate.
>> */
>> + if (!cpu_capacity_greater(env->dst_cpu, i))
>
> Use the same level of interface as above. This makes code and the
> condition easier to follow in find_busiest_queue()
>
> capacity_greater(capacity_of(env->dst_cpu), capacity_of(i))
>

OK