From: Thomas Gleixner <tglx@kernel.org>
To: Karl Mehltretter <kmehltretter@gmail.com>
Cc: John Stultz <jstultz@google.com>, Stephen Boyd <sboyd@kernel.org>,
Miroslav Lichvar <mlichvar@redhat.com>,
Jiri Wiesner <jwiesner@suse.de>,
Daniel J Blueman <daniel@quora.org>,
regressions@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [REGRESSION] clocksource: delayed watchdog can mark TSC unstable
Date: Sun, 25 Oct 2026 22:47:47 +0100 [thread overview]
Message-ID: <874ie9zc3g.ffs@fw13> (raw)
In-Reply-To: <atmhdRzqx5t8PYrc@gmail.com>
On Thu, Oct 22 2026 at 07:43, Karl Mehltretter wrote:
> On Thu, Oct 15, 2026 at 08:32:25PM +0100, Thomas Gleixner wrote:
>> I did not think about that scenario obvioulsy. The code is resilient
>> against long intervals between two measurements, so the easy and
>> straight forward fix is indeed what you (or the LLM) suggested.
>>
>> Thanks,
>>
>> tglx
>> ---
>> --- a/kernel/time/clocksource.c
>> +++ b/kernel/time/clocksource.c
>> @@ -673,7 +673,7 @@ static void clocksource_watchdog(struct
>>
>> /* Could have been rearmed by a stop/start cycle */
>> if (!timer_pending(&watchdog_timer)) {
>> - watchdog_timer.expires += WATCHDOG_INTERVAL;
>> + watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL;
>> add_timer_local(&watchdog_timer);
>> }
>> }
>
> Yes, I tested this change on v7.3-rc5 (72d3fcf802c4)
>
> baseline patched
> TSC marked unstable 2/3 boots 0/3 boots
> watchdog gaps below 250 ms 3/3 boots 0/3 boots
> minimum traced gap 0.231 ms 505.484 ms
>
> Each boot had four QEMU TCG vCPUs. I used PTRACE_ATTACH to
> stop only the vCPU 0 TCG thread for 800 ms.
Care to send a formal patch? After all you decoded the problem and
suggested the fix. So you should get the credit for it not me.
Thanks,
tglx
next prev parent reply other threads:[~2026-10-25 21:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-10 6:55 Karl Mehltretter
2026-10-15 18:32 ` Thomas Gleixner
2026-10-22 5:43 ` Karl Mehltretter
2026-10-25 21:47 ` Thomas Gleixner [this message]
2026-10-26 1:02 ` [PATCH] clocksource: Prevent immediate watchdog rerun after a delay Karl Mehltretter
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=874ie9zc3g.ffs@fw13 \
--to=tglx@kernel.org \
--cc=daniel@quora.org \
--cc=jstultz@google.com \
--cc=jwiesner@suse.de \
--cc=kmehltretter@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mlichvar@redhat.com \
--cc=regressions@lists.linux.dev \
--cc=sboyd@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®