Re: [PATCH v2] sched/cputime: Don't account idle time twice after dyntick-idle

From: Stian Halseth

Date: Tue Oct 06 2026 - 07:41:42 EST


On Tue, 2026-10-06 at 13:19 +0200, Stian Halseth wrote:
> On Tue, 2026-10-06 at 13:08 +0200, Frederic Weisbecker wrote:
>
> > > Only with steal time, and that is older than the rework. I ran
> > > the
> > > same
> > > guest test on v7.1 and on ad5a9e14ec8b, the parent of
> > > cf6444c3e1bb7.
> > > Total CPU time per wall second on the loaded vCPU:
> > >
> > >                           v7.1    ad5a9e14ec8b   v2
> > >   3.7 ms sleeps           0.995   0.996          0.998
> > >   pipe ping-pong          0.997   0.996          1.000
> > >   steal, sleep + spin     1.029   1.028          1.008
> > >   steal, pipe ping-pong   1.338   1.341          1.001
> > >
> > > Without steal time nothing was counted twice before the rework.
> > > With
> > > steal time, v7.1 counted steal time during idle as both idle and
> > > steal
> > > time. The rework fixed most of that, and what is left with a busy
> > > spin
> > > after each wakeup is smaller than before.
> >
> > Ok and you haven't observed a real difference between your v1 and
> > v2,
> > right?
> >
> No, not in normal operation.
>
> It only made a difference with a test-only change that stops the tick
> on every idle entry. There v2 added to a pending overlap about 900
> times a second, which v1 lost.
>
> /Stian
>
IMO the pre-existing steal time issue is out of scope for this patch,
and would require a separate investigation, _if_ it's worth the time.

Attachment: signature.asc
Description: This is a digitally signed message part