aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/tsc.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-11-19 13:47:43 +0000
committerThomas Gleixner <tglx@linutronix.de>2016-11-29 19:23:18 +0100
commitcc4db26899dcd0e6ff0448c77abd8eb61b1a1333 (patch)
treedd93ebfae23bbbb9b6ee555a1ea0ec38c683feb9 /arch/x86/include/asm/tsc.h
parentx86/tsc: Prepare warp test for TSC adjustment (diff)
downloadlinux-dev-cc4db26899dcd0e6ff0448c77abd8eb61b1a1333.tar.xz
linux-dev-cc4db26899dcd0e6ff0448c77abd8eb61b1a1333.zip
x86/tsc: Try to adjust TSC if sync test fails
If the first CPU of a package comes online, it is necessary to test whether the TSC is in sync with a CPU on some other package. When a deviation is observed (time going backwards between the two CPUs) the TSC is marked unstable, which is a problem on large machines as they have to fall back to the HPET clocksource, which is insanely slow. It has been attempted to compensate the TSC by adding the offset to the TSC and writing it back some time ago, but this never was merged because it did not turn out to be stable, especially not on older systems. Modern systems have become more stable in that regard and the TSC_ADJUST MSR allows us to compensate for the time deviation in a sane way. If it's available allow up to three synchronization runs and if a time warp is detected the starting CPU can compensate the time warp via the TSC_ADJUST MSR and retry. If the third run still shows a deviation or when random time warps are detected the test terminally fails. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Link: http://lkml.kernel.org/r/20161119134018.048237517@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/include/asm/tsc.h')
0 files changed, 0 insertions, 0 deletions