Re: [PATCH 3/9] sched/balancing: Change 'enum cpu_idle_type' to have more natural definitions

From: Valentin Schneider
Date: Tue Mar 05 2024 - 05:56:23 EST


On 04/03/24 10:48, Ingo Molnar wrote:
> And gets rid of the double negation in these usages:
>
> - if (env->idle != CPU_NOT_IDLE && env->src_rq->nr_running <= 1)
> + if (env->idle && env->src_rq->nr_running <= 1)
>

Yes please :-)

> Furthermore, this makes code much more obvious where there's
> differentiation between CPU_IDLE and CPU_NEWLY_IDLE.
>
> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
> Cc: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Cc: Valentin Schneider <vschneid@xxxxxxxxxx>

Reviewed-by: Valentin Schneider <vschneid@xxxxxxxxxx>