lkml.org 
[lkml]   [2018]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subject[BUG]Uncalibrated TSC is not accurate enough as a time keeper
The cpu_khz and tsc_khz are now read directly by the cpuid
instruction, and they are deemed to be very accurate. But this is not
the case in our situation. The OS time lags behind about 8 seconds per
hour. The CPU information is as follows:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
stepping : 4
microcode : 0x200004d
cpu MHz : 2300.000
cache size : 25344 KB
physical id : 0
siblings : 36
core id : 0
cpu cores : 18
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
It is this "cpuid level 22" that makes the kernel 4.14 to read both
cpu_khz and tsc_khz directly by instruction "cpuid", and the TSC is
thought to be very accurate, but in fact it is not.
------------
* TSC frequency determined by CPUID is a "hardware reported"
* frequency and is the most accurate one so far we have. This
* is considered a known frequency.
+*
+* The assumption may not be valid!
+*
*/
- setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);

\
 
 \ /
  Last update: 2018-12-23 07:57    [W:0.032 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site