Re: [tip: sched/core] sched/balance: Skip unnecessary updates to idle load balancer's flags

From: Tim Chen
Date: Wed Jun 05 2024 - 13:07:44 EST


On Wed, 2024-06-05 at 14:54 +0000, tip-bot2 for Tim Chen wrote:
>
> Signed-off-by: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> Reviewed-by: Chen Yu <yu.c.chen@xxxxxxxxx>
> Reviewed-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
> Link: https://lore.kernel.org/r/20240531205452.65781-1-tim.c.chen@xxxxxxxxxxxxxxx

Peter,

Thanks for putting the patch in tip.

Can you also also add 

Tested-by: Mohini Narkhede <mohini.narkhede@xxxxxxxxx>

Thanks.

Tim

> ---
> kernel/sched/fair.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 63113dc..41b5838 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -11892,6 +11892,13 @@ static void kick_ilb(unsigned int flags)
> return;
>
> /*
> + * Don't bother if no new NOHZ balance work items for ilb_cpu,
> + * i.e. all bits in flags are already set in ilb_cpu.
> + */
> + if ((atomic_read(nohz_flags(ilb_cpu)) & flags) == flags)
> + return;
> +
> + /*
> * Access to rq::nohz_csd is serialized by NOHZ_KICK_MASK; he who sets
> * the first flag owns it; cleared by nohz_csd_func().
> */