Re: [PATCH v5 2/2] sched/fair: Simplify balance_interval reset logic in sched_balance_rq()

From: Xin Zhao

Date: Thu Jun 18 2026 - 06:19:38 EST


On Thu, 18 Jun 2026 11:40:56 +0200 Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> This is very confusing, and my AI helper isn't helping much this time
> around.
>
> active_balance is initialized 0, it is only (but not always) set 1 when
> need_active_balance().
>
> Therefore, the condition: !active_balance || need_active_balance() is a
> truism and can be removed.
>
> Or am I missing something more complicated?

Sorry for my poor English again.

I will change the commit log as below:

active_balance is initialized 0, it is only (but not always) set 1 when
need_active_balance().

Therefore, the condition: !active_balance || need_active_balance() is a
truism in most cases and can be removed.

Thanks
Xin Zhao