Re: [PATCH] x86/tsc: Add tsc_tuned_baseclk flag disabling CPUID.16h use for tsc calibration

From: Krzysztof Piecuch
Date: Mon Jan 20 2020 - 06:15:40 EST


On Friday, January 17, 2020 4:37 PM, Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:
> Wouldnât it be better to have an option tsc_max_refinement= to increase the 1%?

All that is in the commends about it say that:

* If there are any calibration anomalies (too many SMIs, etc),
* or the refined calibration is off by 1% of the fast early
* calibration, we throw out the new calibration and use the
* early calibration.

I still don't fully understand why the "1% rule" exists.

Ideally it would be better to get the early calibration right than risk getting
it wrong because of an "anomaly".
OTOH if you system doesn't support any of the early calibration methods other
than CPUID.16h (mine doesn't support either PIT or MSR) "tsc_max_refinement"
would allow you to control max tsc_hz error.

If you think that would be better please let me know.