diff options
author | Daniel Vacek <neelx@redhat.com> | 2018-11-05 18:10:40 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-11-06 21:53:15 +0100 |
commit | a786ef152cdcfebc923a67f63c7815806eefcf81 (patch) | |
tree | 3a29cf70452df09bb81b51b867e1ca5e37f25e09 /arch/unicore32/kernel/head.S | |
parent | 651022382c7f8da46cb4872a545ee1da6d097d2a (diff) |
x86/tsc: Make calibration refinement more robust
The threshold in tsc_read_refs() is constant which may favor slower CPUs
but may not be optimal for simple reading of reference on faster ones.
Hence make it proportional to tsc_khz when available to compensate for
this. The threshold guards against any disturbance like IRQs, NMIs, SMIs
or CPU stealing by host on guest systems so rename it accordingly and
fix comments as well.
Also on some systems there is noticeable DMI bus contention at some point
during boot keeping the readout failing (observed with about one in ~300
boots when testing). In that case retry also the second readout instead of
simply bailing out unrefined. Usually the next second the readout returns
fast just fine without any issues.
Signed-off-by: Daniel Vacek <neelx@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://lkml.kernel.org/r/1541437840-29293-1-git-send-email-neelx@redhat.com
Diffstat (limited to 'arch/unicore32/kernel/head.S')
0 files changed, 0 insertions, 0 deletions