From: Waiman Long <longman@redhat.com>
To: Feng Tang <feng.tang@intel.com>, "Paul E. McKenney" <paulmck@kernel.org>
Cc: John Stultz <john.stultz@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Stephen Boyd <sboyd@kernel.org>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Cassio Neri <cassio.neri@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Colin Ian King <colin.king@canonical.com>,
Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [PATCH 1/2] clocksource: Avoid accidental unstable marking of clocksources
Date: Sun, 14 Nov 2021 22:24:56 -0500 [thread overview]
Message-ID: <e2d300c4-cc0d-47c4-3e7d-8a1cc3546719@redhat.com> (raw)
In-Reply-To: <20211115020851.GB29845@shbuild999.sh.intel.com>
On 11/14/21 21:08, Feng Tang wrote:
> Or did you have something else in mind?
>>>> I'm not sure the detail in Waiman's cases, and in our cases (stress-ng)
>>>> the delay between watchdog's (HPET here) read were not linear, that
>>>> from debug data, sometimes the 3-2 difference could be bigger or much
>>>> bigger than the 2-1 difference.
>>>>
>>>> The reason could be the gap between 2 reads depends hugely on the system
>>>> pressure at that time that 3 HPET read happens. On our test box (a
>>>> 2-Socket Cascade Lake AP server), the 2-1 and 3-2 difference are stably
>>>> about 2.5 us, while under the stress it could be bumped to from 6 us
>>>> to 2800 us.
>>>>
>>>> So I think checking the 3-2 difference plus increasing the max retries
>>>> to 10 may be a simple way, if the watchdog read is found to be
>>>> abnormally long, we skip this round of check.
>>> On one of the test system, I had measured that normal delay
>>> (hpet->tsc->hpet) was normally a bit over 2us. It was a bit more than 4us at
>>> bootup time. However, the same system under stress could have a delay of
>>> over 200us at bootup time. When I measured the consecutive hpet delay, it
>>> was about 180us. So hpet read did dominate the total clocksource read delay.
>> Thank you both for the data!
>>
>>> I would not suggest increasing the max retries as it may still fail in most
>>> cases because the system stress will likely not be going away within a short
>>> time. So we are likely just wasting cpu times. I believe we should just skip
>>> it if it is the watchdog read that is causing most of the delay.
>> If anything, adding that extra read would cause me to -reduce- the number
>> of retries to avoid increasing the per-watchdog overhead.
>
> I understand Waiman's concern here, and in our test patch, the 2
> consecutive watchdog read delay check is done inside this retrying
> loop accompanying the 'cs' read, and once an abnormal delay is found,
> the watchdog check is skipped without waiting for the max-retries to
> complete.
>
> Our test data shows the consecutive delay is not always big even when
> the system is much stressed, that's why I suggest to increase the
> retries.
If we need a large number of retries to avoid triggering the unstable
TSC message, we should consider increase the threshod instead. Right?
That is why my patch 2 makes the max skew value a configurable option so
that we can tune it if necessary.
Cheers,
Longman
next prev parent reply other threads:[~2021-11-15 3:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 22:17 [PATCH 0/2] clocksource: Avoid incorrect hpet fallback Waiman Long
2021-11-10 22:17 ` [PATCH 1/2] clocksource: Avoid accidental unstable marking of clocksources Waiman Long
2021-11-11 4:57 ` Feng Tang
2021-11-11 14:43 ` Paul E. McKenney
2021-11-12 5:44 ` Feng Tang
2021-11-12 13:47 ` Paul E. McKenney
2021-11-13 3:43 ` Waiman Long
2021-11-14 15:54 ` Paul E. McKenney
2021-11-15 2:08 ` Feng Tang
2021-11-15 3:24 ` Waiman Long [this message]
2021-11-15 7:59 ` Feng Tang
2021-11-15 14:07 ` Paul E. McKenney
2021-11-16 1:36 ` Feng Tang
2021-11-16 20:36 ` Paul E. McKenney
2021-11-15 19:19 ` Waiman Long
2021-11-10 22:17 ` [PATCH 2/2] clocksource: Add a Kconfig option for WATCHDOG_MAX_SKEW Waiman Long
2021-11-10 22:32 ` [PATCH 0/2] clocksource: Avoid incorrect hpet fallback Paul E. McKenney
2021-11-10 23:25 ` Waiman Long
2021-11-11 0:04 ` Paul E. McKenney
2021-11-11 1:19 ` Waiman Long
2021-11-11 1:23 ` Feng Tang
2021-11-11 1:30 ` Waiman Long
2021-11-11 1:53 ` Feng Tang
2021-11-11 3:07 ` 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=e2d300c4-cc0d-47c4-3e7d-8a1cc3546719@redhat.com \
--to=longman@redhat.com \
--cc=cassio.neri@gmail.com \
--cc=colin.king@canonical.com \
--cc=feng.tang@intel.com \
--cc=frederic@kernel.org \
--cc=john.stultz@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
/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®