From: Feng Tang <feng.tang@intel.com>
To: Waiman Long <longman@redhat.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
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>,
Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [PATCH 0/2] clocksource: Avoid incorrect hpet fallback
Date: Thu, 11 Nov 2021 09:53:31 +0800 [thread overview]
Message-ID: <20211111015331.GA15724@shbuild999.sh.intel.com> (raw)
In-Reply-To: <551c33a1-25d0-a840-f26b-238bee51d4ec@redhat.com>
On Wed, Nov 10, 2021 at 08:30:10PM -0500, Waiman Long wrote:
>
> On 11/10/21 20:23, Feng Tang wrote:
> > Hi Waiman, Paul,
> >
> > On Wed, Nov 10, 2021 at 05:17:30PM -0500, Waiman Long wrote:
> > > It was found that when an x86 system was being stressed by running
> > > various different benchmark suites, the clocksource watchdog might
> > > occasionally mark TSC as unstable and fall back to hpet which will
> > > have a signficant impact on system performance.
> > We've seen similar cases while running 'netperf' and 'lockbus/ioport'
> > cases of 'stress-ng' tool.
> >
> > In those scenarios, the clocksource used by kernel is tsc, while
> > hpet is used as watchdog. And when the "screwing" happens, we found
> > mostly it's the hpet's 'fault', that when system is under extreme
> > pressure, the read of hpet could take a long time, and even 2
> > consecutive read of hpet will have a big gap (up to 1ms+) in between.
> > So the screw we saw is actually caused by hpet instead of tsc, as
> > tsc read is a lightweight cpu operation
> >
> > I tried the following patch to detect the screw of watchdog itself,
> > and avoid wrongly judging the tsc to be unstable. It does help in
> > our tests, please help to review.
> >
> > And one futher idea is to also adding 2 consecutive read of current
> > clocksource, and compare its gap with watchdog's, and skip the check
> > if the watchdog's is bigger.
>
> That is what I found too. And I also did a 2nd watchdog read to compare the
> consecutive delay versus half the threshold and skip the test if it exceeds
> it. My patch is actually similar in concept to what your patch does.
Aha, yes, I missed that.
I just got to office, and saw the disucssion around 0/2 patch and replied,
without going through the patches, sorry about that.
0day reported some cases about stress-ng testing, and we are still testing
differenct cases we've seen.
Thanks,
Feng
> Cheers,
> Longman
next prev parent reply other threads:[~2021-11-11 1:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 22:17 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
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 [this message]
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=20211111015331.GA15724@shbuild999.sh.intel.com \
--to=feng.tang@intel.com \
--cc=cassio.neri@gmail.com \
--cc=frederic@kernel.org \
--cc=john.stultz@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--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®