From: Feng Tang <feng.tang@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: 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@fb.com,
neeraju@codeaurora.org, ak@linux.intel.com,
zhengjun.xing@intel.com,
Xing Zhengjun <zhengjun.xing@linux.intel.com>
Subject: Re: [PATCH v14 clocksource 4/6] clocksource: Reduce clocksource-skew threshold for TSC
Date: Wed, 12 May 2021 21:18:15 +0800 [thread overview]
Message-ID: <20210512131815.GA37641@shbuild999.sh.intel.com> (raw)
In-Reply-To: <20210512035156.GT975577@paulmck-ThinkPad-P17-Gen-1>
Hi Paul,
On Tue, May 11, 2021 at 08:51:56PM -0700, Paul E. McKenney wrote:
> On Wed, May 12, 2021 at 10:18:49AM +0800, Feng Tang wrote:
> > Hi Paul,
> >
> > On Tue, May 11, 2021 at 04:34:53PM -0700, Paul E. McKenney wrote:
[SNIP]
> > > * Ensure clocksources that have large 'mult' values don't overflow
> > > * when adjusted.
> > > diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
> > > index a492e4da69ba..b3f608c2b936 100644
> > > --- a/kernel/time/jiffies.c
> > > +++ b/kernel/time/jiffies.c
> > > @@ -49,13 +49,14 @@ static u64 jiffies_read(struct clocksource *cs)
> > > * for "tick-less" systems.
> > > */
> > > static struct clocksource clocksource_jiffies = {
> > > - .name = "jiffies",
> > > - .rating = 1, /* lowest valid rating*/
> > > - .read = jiffies_read,
> > > - .mask = CLOCKSOURCE_MASK(32),
> > > - .mult = TICK_NSEC << JIFFIES_SHIFT, /* details above */
> > > - .shift = JIFFIES_SHIFT,
> > > - .max_cycles = 10,
> > > + .name = "jiffies",
> > > + .rating = 1, /* lowest valid rating*/
> > > + .uncertainty_margin = TICK_NSEC,
> >
> > 'jiffies' is known to be very bad as a watchdog ("worse bandaid" in
> > Thomas' words :)), and TICK_NSEC just turns to 1ms for HZ=1000 case.
> > Maybe we should give it a bigger margin, like the 32ms margin for
> > 'tsc-early'?
> >
> > Other than this, it looks good to me, thanks!
>
> As in the fixup diff below?
Yep, thanks,
>
> Would you be willing to provide an ack or tested-by for the rest
> of the series? (I have your ack on 1/6.)
I haven't figured out a way to check 5/6 patch yet, but feel free
to add my ack for the first 4 patches (1/6 ~ 4/6)
Acked-by: Feng Tang <feng.tang@intel.com>
Thanks,
Feng
>
> Thanx, Paul
>
> ------------------------------------------------------------------------
>
> diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
> index b3f608c2b936..01935aafdb46 100644
> --- a/kernel/time/jiffies.c
> +++ b/kernel/time/jiffies.c
> @@ -51,7 +51,7 @@ static u64 jiffies_read(struct clocksource *cs)
> static struct clocksource clocksource_jiffies = {
> .name = "jiffies",
> .rating = 1, /* lowest valid rating*/
> - .uncertainty_margin = TICK_NSEC,
> + .uncertainty_margin = 32 * NSEC_PER_MSEC,
> .read = jiffies_read,
> .mask = CLOCKSOURCE_MASK(32),
> .mult = TICK_NSEC << JIFFIES_SHIFT, /* details above */
next prev parent reply other threads:[~2021-05-12 13:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 23:34 [PATCH v14 clocksource 0/5] Do not mark clocks unstable due to delays for v5.14 Paul E. McKenney
2021-05-11 23:34 ` [PATCH v14 clocksource 1/6] clocksource: Retry clock read if long delays detected Paul E. McKenney
2021-05-11 23:34 ` [PATCH v14 clocksource 2/6] clocksource: Check per-CPU clock synchronization when marked unstable Paul E. McKenney
2021-05-11 23:34 ` [PATCH v14 clocksource 3/6] clocksource: Limit number of CPUs checked for clock synchronization Paul E. McKenney
2021-05-11 23:34 ` [PATCH v14 clocksource 4/6] clocksource: Reduce clocksource-skew threshold for TSC Paul E. McKenney
2021-05-12 2:18 ` Feng Tang
2021-05-12 3:51 ` Paul E. McKenney
2021-05-12 13:18 ` Feng Tang [this message]
2021-05-12 17:14 ` Paul E. McKenney
2021-05-11 23:34 ` [PATCH v14 clocksource 5/6] clocksource: Provide kernel module to test clocksource watchdog Paul E. McKenney
2021-05-13 3:29 ` Feng Tang
2021-05-13 4:01 ` Paul E. McKenney
2021-05-11 23:34 ` [PATCH v14 clocksource 6/6] clocksource: Print deviation in nanoseconds for unstable case Paul E. McKenney
2021-05-12 2:21 ` Feng Tang
2021-05-12 3:38 ` 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=20210512131815.GA37641@shbuild999.sh.intel.com \
--to=feng.tang@intel.com \
--cc=Mark.Rutland@arm.com \
--cc=ak@linux.intel.com \
--cc=corbet@lwn.net \
--cc=john.stultz@linaro.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=neeraju@codeaurora.org \
--cc=paulmck@kernel.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=zhengjun.xing@intel.com \
--cc=zhengjun.xing@linux.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;
as well as URLs for NNTP newsgroup(s).