Re: [PATCH v2] sched/core: forced idle accounting

From: Josh Don
Date: Wed Nov 10 2021 - 14:05:48 EST


On Wed, Nov 10, 2021 at 12:59 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> > Ok, I already changed the patch to include the above, lemme also edit
> > sched_core_tick().
>
>
> Something like so then?
>
[snip]

Thanks Peter! Looks good to me.

One thing to note though: now that we don't have the
schedstat_enabled() check in __sched_core_account_forceidle(), I'd
recommend either adding a "REQUIRES: schedstat enabled" comment to be
explicit, or switching to schedstat_add().