From: Waiman Long <longman@redhat.com>
To: paulmck@kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, john.stultz@linaro.org,
sboyd@kernel.org, corbet@lwn.net, Mark.Rutland@arm.com,
maz@kernel.org, kernel-team@meta.com, neeraju@codeaurora.org,
ak@linux.intel.com, feng.tang@intel.com, zhengjun.xing@intel.com,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
x86@kernel.org
Subject: Re: [PATCH v2 clocksource 6/7] clocksource: Verify HPET and PMTMR when TSC unverified
Date: Wed, 1 Feb 2023 22:40:56 -0500 [thread overview]
Message-ID: <39752908-cc10-d63f-d02e-381693060af8@redhat.com> (raw)
In-Reply-To: <20230201195517.GM2948950@paulmck-ThinkPad-P17-Gen-1>
On 2/1/23 14:55, Paul E. McKenney wrote:
> On Wed, Feb 01, 2023 at 02:26:29PM -0500, Waiman Long wrote:
>> On 2/1/23 05:24, Thomas Gleixner wrote:
>>> Paul!
>>>
>>> On Tue, Jan 24 2023 at 16:27, Paul E. McKenney wrote:
>>>> On systems with two or fewer sockets, when the boot CPU has CONSTANT_TSC,
>>>> NONSTOP_TSC, and TSC_ADJUST, clocksource watchdog verification of the
>>>> TSC is disabled. This works well much of the time, but there is the
>>>> occasional production-level system that meets all of these criteria, but
>>>> which still has a TSC that skews significantly from atomic-clock time.
>>>> This is usually attributed to a firmware or hardware fault. Yes, the
>>>> various NTP daemons do express their opinions of userspace-to-atomic-clock
>>>> time skew, but they put them in various places, depending on the daemon
>>>> and distro in question. It would therefore be good for the kernel to
>>>> have some clue that there is a problem.
>>>>
>>>> The old behavior of marking the TSC unstable is a non-starter because a
>>>> great many workloads simply cannot tolerate the overheads and latencies
>>>> of the various non-TSC clocksources. In addition, NTP-corrected systems
>>>> sometimes can tolerate significant kernel-space time skew as long as
>>>> the userspace time sources are within epsilon of atomic-clock time.
>>>>
>>>> Therefore, when watchdog verification of TSC is disabled, enable it for
>>>> HPET and PMTMR (AKA ACPI PM timer). This provides the needed in-kernel
>>>> time-skew diagnostic without degrading the system's performance.
>>> I'm more than unhappy about this. We finally have a point where the TSC
>>> watchdog overhead can go away without adding TSC=reliable to the kernel
>>> commandline.
>>>
>>> Now you add an unconditionally enforce the watchdog again in a way which
>>> even cannot be disabled on the kernel command line.
>>>
>>> Patently bad idea, no cookies for you!
>> I have a similar concern about this patch as well. That is why I was
>> suggesting to have this enabled for a limited time after boot for sanity
>> checking purpose only.
> Fair enough!
>
> If the watchdog checking of HPET and/or PMTMR against TSC only happens
> only when the sysadm asks for it, would you still want to have the ability
> to enable such watchdog checking at boot time, and then to disable it
> once the system had been running for some limited time?
Yes, being optional is another way to avoid the overhead for the
majority of users. The paranoids can turn it on if they want to.
Cheers,
Longman
next prev parent reply other threads:[~2023-02-02 3:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 0:27 [PATCH clocksource v2 0/7] Clocksource watchdog updates for v6.3 Paul E. McKenney
2023-01-25 0:27 ` [PATCH v2 clocksource 1/7] clocksource: Print clocksource name when clocksource is tested unstable Paul E. McKenney
2023-01-25 0:27 ` [PATCH v2 clocksource 2/7] clocksource: Loosen clocksource watchdog constraints Paul E. McKenney
2023-01-25 0:27 ` [PATCH v2 clocksource 3/7] clocksource: Improve read-back-delay message Paul E. McKenney
2023-01-25 0:27 ` [PATCH v2 clocksource 4/7] clocksource: Improve "skew is too large" messages Paul E. McKenney
2023-01-25 0:27 ` [PATCH v2 clocksource 5/7] clocksource: Suspend the watchdog temporarily when high read latency detected Paul E. McKenney
2023-01-25 0:27 ` [PATCH v2 clocksource 6/7] clocksource: Verify HPET and PMTMR when TSC unverified Paul E. McKenney
2023-01-26 10:57 ` Daniel Lezcano
2023-02-01 0:50 ` Paul E. McKenney
2023-02-01 10:24 ` Thomas Gleixner
2023-02-01 15:10 ` Feng Tang
2023-02-01 19:26 ` Waiman Long
2023-02-01 19:55 ` Paul E. McKenney
2023-02-02 3:40 ` Waiman Long [this message]
2023-02-02 4:54 ` Paul E. McKenney
2023-02-02 7:57 ` Thomas Gleixner
2023-02-04 1:27 ` Paul E. McKenney
2023-02-01 19:51 ` Paul E. McKenney
2023-01-25 0:27 ` [PATCH v2 clocksource 7/7] x86/tsc: Add option to force frequency recalibration with HW timer Paul E. McKenney
2023-02-03 4:36 ` PATCH v2 clocksource 8/7] clocksource: Enable TSC watchdog checking of HPET and PMTMR only when requested Paul E. McKenney
2023-02-06 19:57 ` Waiman Long
2023-02-07 1:08 ` Paul E. McKenney
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=39752908-cc10-d63f-d02e-381693060af8@redhat.com \
--to=longman@redhat.com \
--cc=Mark.Rutland@arm.com \
--cc=ak@linux.intel.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=daniel.lezcano@linaro.org \
--cc=dave.hansen@linux.intel.com \
--cc=feng.tang@intel.com \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mingo@redhat.com \
--cc=neeraju@codeaurora.org \
--cc=paulmck@kernel.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=zhengjun.xing@intel.com \
/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®