Re: [PATCH v3 04/10] sched/fair: rework load_balance

From: Valentin Schneider
Date: Tue Oct 08 2019 - 11:48:39 EST


On 08/10/2019 16:30, Vincent Guittot wrote:
[...]
>
> This is how I plan to get ride of the problem:
> + if (busiest->group_weight == 1 || sds->prefer_sibling) {
> + unsigned int nr_diff = busiest->sum_h_nr_running;
> + /*
> + * When prefer sibling, evenly spread running tasks on
> + * groups.
> + */
> + env->migration_type = migrate_task;
> + lsub_positive(&nr_diff, local->sum_h_nr_running);
> + env->imbalance = nr_diff >> 1;
> + return;
> + }
>

I think this wants a

/* Local could have more tasks than busiest */

atop the lsub, otherwise yeah that ought to work.