mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Feng Tang <feng.tang@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Dave Hansen <dave.hansen@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H . Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>, <rui.zhang@intel.com>,
	<x86@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC] x86/tsc: Make recalibration default on for TSC_KNOWN_FREQ cases
Date: Mon, 5 Jun 2023 09:04:45 +0800	[thread overview]
Message-ID: <ZH00rXjK+H1BTBrQ@feng-clx> (raw)
In-Reply-To: <2c5a8c69-21d0-4b1a-ad1b-6072228e2b43@paulmck-laptop>

On Fri, Jun 02, 2023 at 12:08:10PM -0700, Paul E. McKenney wrote:
> On Fri, Jun 02, 2023 at 11:36:54AM -0700, Dave Hansen wrote:
> > On 6/2/23 11:29, Paul E. McKenney wrote:
> > >>> One downside is, many VMs also has X86_FEATURE_TSC_KNOWN_FREQ set,
> > >>> and they will also do this recalibration.
> > >> It's also pointless for those SoCs which lack legacy hardware.
> > >>
> > >> So why do you force this on everyone?
> > > Just for the record, this patch could be helpful in allowing victims
> > > of TSC mis-synchronization to more easily provide a more complete bug
> > > report to the firmware people.  There is of course no point if there is
> > > already a fix available.
> > > 
> > > But it is not all that hard to work around not having this patch upstream.
> > > This can be hand-applied as needed, NTP drift rates can be pressed
> > > into service for those of us having atomic clocks near all our servers,
> > > or the firmware guys can be tasked with figuring it out.
> > > 
> > > So this patch would be nice to have, but we could live without it.
> > 
> > Is this the kind of thing we could relegate to a kernel unit test?  Like
> > make the recalibration logic _available_, but don't have it affect the
> > rest of the system.
> > 
> > I love patching my kernel as much as the next guy.  But, you know what I
> > *don't* love?  Explaining how to patch kernels to other people. ;)
> 
> One could argue that we already have the TSC equivalent of a kernel unit
> test with the tsc=recalibrate kernel boot parameter.
> 
> So, would it make sense to have something like tsc=recalibrate (already
> present) in the guise of something like hpet=recalibrate and/or
> pmtmr=recalibrate in order to allow people to opt into recalibrating
> whatever timer is marked unstable?
 
This kind of hint parsing should be in tsc.c, so some name like
'tsc_recal=hpet/pmtmr' ?  

As hpet and pmtimer are the only 2 choices and hpet is the default
one, if people want to use pmtimer, they can use combined parameter 
"tsc=recalibrate nohpet".

Also, thanks for sharing your thoughts form a victim's viewpoint
in the other mail! :)

Thanks,
Feng

> 							Thanx, Paul

  reply	other threads:[~2023-06-05  1:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22  3:30 Feng Tang
2023-05-22  8:14 ` Thomas Gleixner
2023-05-22  8:47   ` Feng Tang
2023-05-22 11:49     ` Thomas Gleixner
2023-05-22 13:00       ` Feng Tang
2023-05-22 14:31         ` Thomas Gleixner
2023-05-22 15:20           ` Feng Tang
2023-05-22 16:11             ` Peter Zijlstra
2023-05-23  1:18               ` Feng Tang
2023-05-23  8:11                 ` Peter Zijlstra
2023-05-23 14:31                   ` Feng Tang
2023-06-02 18:29   ` Paul E. McKenney
2023-06-02 18:36     ` Dave Hansen
2023-06-02 19:08       ` Paul E. McKenney
2023-06-05  1:04         ` Feng Tang [this message]
2023-06-08 16:58           ` 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=ZH00rXjK+H1BTBrQ@feng-clx \
    --to=feng.tang@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rui.zhang@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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®