Re: [PATCH] sched/fair: Disable LB_BIAS by default

From: Peter Zijlstra
Date: Mon Sep 10 2018 - 10:12:17 EST


On Thu, Aug 09, 2018 at 02:57:53PM +0100, Dietmar Eggemann wrote:
> LB_BIAS allows the adjustment on how conservative load should be
> balanced.

> It is very likely that LB_BIAS' influence on load balancing can be
> neglected (see test results below). This is further supported by:
>
> (1) Weighted CPU load today is by itself a decayed average value (PELT)
> (cfs_rq->avg->runnable_load_avg) and not the instantaneous load
> (rq->load.weight) it was when LB_BIAS was introduced.
>
> (2) Sd imbalance_pct is used for CPU_NEWLY_IDLE and CPU_NOT_IDLE (relate
> to sd's newidle and busy idx) in find_busiest_group() when comparing
> busiest and local avg load to make load balancing even more
> conservative.
>
> (3) The sd forkexec and newidle idx are always set to 0 so there is no
> adjustment on how conservatively load balancing is done here.
>
> (4) Affine wakeup based on weight (wake_affine_weight()) will not be
> impacted since the sd wake idx is always set to 0.
>
> Let's disable LB_BIAS by default for a few kernel releases to make sure
> that no workload and no scheduler topology is affected. The benefit of
> being able to remove the LB_BIAS dependency from source_load() and
> target_load() is that the entire rq->cpu_load[idx] code could be removed
> in this case.

Certainly worth a try; as I've written somewhere in a comment; it would
be very nice to get rid of that load tracking crud.

And it is trivial to revert if something does show up.

Ingo, what do you think?

> Signed-off-by: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
> ---
> kernel/sched/features.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/features.h b/kernel/sched/features.h
> index 85ae8488039c..858589b83377 100644
> --- a/kernel/sched/features.h
> +++ b/kernel/sched/features.h
> @@ -39,7 +39,7 @@ SCHED_FEAT(WAKEUP_PREEMPTION, true)
>
> SCHED_FEAT(HRTICK, false)
> SCHED_FEAT(DOUBLE_TICK, false)
> -SCHED_FEAT(LB_BIAS, true)
> +SCHED_FEAT(LB_BIAS, false)
>
> /*
> * Decrement CPU capacity based on time not spent running tasks
> --
> 2.11.0
>