Re: [PATCH 3/3] sched/fair: reduce cases for active balance

From: Peter Zijlstra
Date: Wed Jan 06 2021 - 11:12:21 EST


On Wed, Jan 06, 2021 at 04:41:04PM +0100, Vincent Guittot wrote:

> Let me try again:
>
> Active balance is triggered for a number of voluntary cases like
> misfit or pinned tasks cases but also after that a number of load
> balance attempts failed to migrate a task. There is no need to use
> active load balance when the group is overloaded because an overloaded
> state means that there is at least one waiting task. Nevertheless, the
> waiting task is not selected and detached until the threshold becomes
> higher than its load. This threshold increases with the number of
> failed lb (see the condition if ((load >> env->sd->nr_balance_failed)
> > env->imbalance) in detach_tasks()) and the waiting task will end up
> to be selected after a number of attempts.

Ah, makes sense now. Thanks!