Re: [PATCH v2 2/3] sched/fair: Make cfs_rq::idle the sum of ancestor tg::idle
From: Josh Don
Date: Mon Nov 09 2026 - 18:50:36 EST
On Sat, Nov 7, 2026 at 3:36 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
>
> Rather than keeping cfs_rq::idle as a copy of tg::idle, make it the sum of
> all ancestor tg::idle. This makes it trivial to tell if the current cgroup
> is marked idle somewhere along its ancestral path.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> ---
> kernel/sched/debug.c | 1
> kernel/sched/fair.c | 88 +++++++++++++++++++++++++++++++--------------------
> kernel/sched/sched.h | 2 -
> 3 files changed, 56 insertions(+), 35 deletions(-)
I think this needs better handling now in the next patch in this
chain, but this one looks good. I'll move that discussion over to
patch 3.
Reviewed-by: Josh Don <joshdon@xxxxxxxxxx>