From: Peter Zijlstra <peterz@infradead.org>
To: Feng Tang <feng.tang@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@intel.com>,
"H . Peter Anvin" <hpa@zytor.com>,
Jonathan Corbet <corbet@lwn.net>,
x86@kernel.org, linux-kernel@vger.kernel.org, paulmck@kernel.org,
rui.zhang@intel.com, len.brown@intel.com, tim.c.chen@intel.com
Subject: Re: [PATCH] x86/tsc: Add option to force HW timer based recalibration
Date: Mon, 9 May 2022 09:16:52 +0200 [thread overview]
Message-ID: <20220509071652.GE76023@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20220509045839.GA40730@shbuild999.sh.intel.com>
On Mon, May 09, 2022 at 12:58:39PM +0800, Feng Tang wrote:
> Sorry, just spotted some typos, here is the updated version
>
>
> From ee8e3d772c623d27d79c43da5a76fb6252175aba Mon Sep 17 00:00:00 2001
> From: Feng Tang <feng.tang@intel.com>
> Date: Sun, 8 May 2022 20:22:12 +0800
> Subject: [PATCH] x86/tsc: Add option to force HW timer based recalibration
>
> Currently when HW provides the tsc freq info through MSR or CPUID(0x15),
> the info will be taken as the 'best guess', and kernel will set the
> X86_FEATURE_TSC_KNOWN_FREQ flag and skip the HW timer based recalibration,
> which works pretty well.
>
> And there is still very few corner case that the freq info is not
> accurate enough with small deviation from the actual value, like on
> a product with early buggy version of firmware or on some
> pre-production hardware.
>
> Add an option 'recalibrate' for 'tsc' kernel parameter to force the
> tsc freq recalibration with HPET/PM_TIMER, and warn if the deviation
> from previous value is more than about 500 PPM.
>
> Signed-off-by: Feng Tang <feng.tang@intel.com>
Why isn't 'tsc_early_khz=' not working for you? Afaict that will
override calibrate_tsc() when provided and as such can be used on these
early platforms for provide the right value until such time that the
firmware is fixed.
next prev parent reply other threads:[~2022-05-09 7:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-08 14:47 [PATCH] x86/tsc: Add option to force HW timer based recalibration Feng Tang
2022-05-09 4:58 ` Feng Tang
2022-05-09 7:16 ` Peter Zijlstra [this message]
2022-05-09 7:30 ` Feng Tang
2022-05-09 10:01 ` Thomas Gleixner
2022-05-09 11:22 ` Feng Tang
2022-05-09 13:03 ` Thomas Gleixner
2022-05-09 13:36 ` Feng Tang
2022-05-09 13:43 ` Thomas Gleixner
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=20220509071652.GE76023@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@intel.com \
--cc=feng.tang@intel.com \
--cc=hpa@zytor.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=rui.zhang@intel.com \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@intel.com \
--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