Re: [PATCH v2 1/4] x86/time: further improve TSC / CPU freq calibration accuracy

2022-02-08 Thread Jan Beulich
On 24.01.2022 09:25, Jan Beulich wrote: > --- a/xen/arch/x86/time.c > +++ b/xen/arch/x86/time.c > @@ -287,9 +287,47 @@ static char *freq_string(u64 freq) > return s; > } > > -static uint64_t adjust_elapsed(uint64_t elapsed, uint32_t actual, > - uint32_t

[PATCH v2 1/4] x86/time: further improve TSC / CPU freq calibration accuracy

2022-01-24 Thread Jan Beulich
Calibration logic assumes that the platform timer (HPET or ACPI PM timer) and the TSC are read at about the same time. This assumption may not hold when a long latency event (e.g. SMI or NMI) occurs between the two reads. Reduce the risk of reading uncorrelated values by doing at least four pairs