Re: [PATCH v3] sched/cputime: Don't account idle time twice after dyntick-idle
From: Frederic Weisbecker
Date: Wed Oct 14 2026 - 08:24:24 EST
Le Wed, Oct 07, 2026 at 04:29:50PM +0200, Stian Halseth a écrit :
> On idle exit the dyntick-idle accounting accounts the time up to now,
> then the tick is restarted on its old period. The first tick accounts a
> whole TICK_NSEC to whatever runs, although the part of that period
> before the idle exit has just been accounted as idle time, or with
> IRQ_TIME_ACCOUNTING as IRQ time. That is up to a full tick per idle
> exit, and /proc/stat reports more idle time than wall time.
>
> Record how much of the current tick period dyntick-idle has accounted,
> and leave it out of the tick that ends the period.
>
> Fixes: cf6444c3e1bb7 ("tick/sched: Unify idle cputime accounting")
> Link: https://lore.kernel.org/all/20261004142724.3896396-1-stian@xxxxxx/
> Signed-off-by: Stian Halseth <stian@xxxxxx>
Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
Thank you very much!
--
Frederic Weisbecker
SUSE Labs