mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stian Halseth <stian@itx.no>
To: Breno Leitao <leitao@debian.org>
Cc: Frederic Weisbecker <frederic@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Paul Menzel <pmenzel@molgen.mpg.de>,
	Thomas Gleixner <tglx@kernel.org>,
	Anna-Maria Behnsen <anna-maria@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Shrikanth Hegde <sshegde@linux.ibm.com>,
	 regressions@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/cputime: Don't warn when the tick period starts after idle exit
Date: Fri, 30 Oct 2026 21:48:24 +0100	[thread overview]
Message-ID: <91c28133c5e72b847f5bd8aff460747a960cdc32.camel@itx.no> (raw)
In-Reply-To: <auTCQauaU733PY5z@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]

Hi Breno,


On Fri, 2026-10-30 at 09:14 -0700, Breno Leitao wrote:
> On Sun, Oct 25, 2026 at 11:02:02AM +0100, Stian Halseth wrote:
> > I could not hit the window in a KVM guest, but instrumented, the guest
> > showed the sched timer armed 5.9 ms after now at HZ=250 right after a
> > jiffies -> hpet switch, and tick stops saving a ts->last_tick more than
> > a tick ahead. The fix boots without warnings there.
> 
> I am seeing this on my testing real hosts:
> 
>            clocksource: Switched to clocksource tsc-early
>            ------------[ cut here ]------------
>            WARNING: kernel/sched/cputime.c:481 at
> kcpustat_dyntick_stop+0x15e/0x1d0, CPU#2: swapper/2/0  [warn]

Thanks, that is the same case that Paul reported. 

The first idle period of a CPU right after the switch to tsc-early. Your
registers have tick_start 49844000000 (RAX/R14) and now 49843761206 (RBX), so
the idle exit came 239 us before the start of the first tick period, and
R12 is that difference. 

I don't see anything accounted wrong, and the warning is the only problem.
Thispatch drops it.

If you can confirm it goes quiet on those hosts with the patch, maybe you
could provide a Tested-By?

/Stian

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-10-30 20:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 14:29 [PATCH v3] sched/cputime: Don't account idle time twice after dyntick-idle Stian Halseth
2026-10-14 12:17 ` Frederic Weisbecker
2026-10-16  8:01 ` [tip: sched/core] " tip-bot2 for Stian Halseth
2026-10-25  7:27 ` WARNING: kernel/sched/cputime.c:481 at kcpustat_dyntick_stop+0x8b/0xa0, CPU#0: swapper/0/0 (was: [PATCH v3] sched/cputime: Don't account idle time twice after dyntick-idle) Paul Menzel
2026-10-25  8:13   ` Stian Halseth
2026-10-25 10:02   ` [PATCH] sched/cputime: Don't warn when the tick period starts after idle exit Stian Halseth
2026-10-26 16:42     ` Frederic Weisbecker
2026-10-26 17:28       ` Stian Halseth
2026-10-27 17:06         ` Frederic Weisbecker
2026-10-27 19:05           ` Stian Halseth
2026-10-28 14:14             ` Frederic Weisbecker
2026-10-28 17:37               ` Stian Halseth
2026-10-30 16:14     ` Breno Leitao
2026-10-30 20:48       ` Stian Halseth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91c28133c5e72b847f5bd8aff460747a960cdc32.camel@itx.no \
    --to=stian@itx.no \
    --cc=anna-maria@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=regressions@lists.linux.dev \
    --cc=sshegde@linux.ibm.com \
    --cc=tglx@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®