Re: x86/tsc: Set X86_FEATURE_TSC_RELIABLE to skip refined calibration
From: Thomas Gleixner
Date: Fri Jun 17 2016 - 03:50:28 EST
On Thu, 16 Jun 2016, Bin Gao wrote:
> Unlike PIT based calibration which counts TSC cycles against another timer,
> MSR or CPUID method has no calibration - it simply multiplies the known
> frequency of a timer by a ratio. So TSC frequency computed by MSR or CPUID
> is the final frequency and doesn't need the refined calibration process.
> We used to use set_cpu_cap(&boot_cpu_data, X86_FEATURE_TSC_RELIABLE) but
> it actually doesn't skip refined calibration because the flag is cleared
> later in identify_cpu(). A cpu caps flag is not cleared only if it's set
> by setup_force_cpu_cap(). This patch sets the flag in tsc_msr.c and
> replaces set_cpu_cap() with setup_force_cpu_cap() in other files.
I'm not entirely sure that this is correct. At least I want to know John
Stultz's opinion on that.
Thanks,
tglx