public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hyper-v: mark TSC as unstable
@ 2015-08-19 16:54 Vitaly Kuznetsov
  2015-08-21  7:45 ` [tip:x86/platform] x86/hyperv: Mark the Hyper-V " tip-bot for Vitaly Kuznetsov
  0 siblings, 1 reply; 4+ messages in thread
From: Vitaly Kuznetsov @ 2015-08-19 16:54 UTC (permalink / raw)
  To: devel
  Cc: x86, linux-kernel, K. Y. Srinivasan, Haiyang Zhang,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin

Hyper-V top-level functional specification states, that "algorithms should
be resilient to sudden jumps forward or backward in the TSC value", this
means that we should consider TSC as unstable. In some cases tsc tests are
able to detect the instability, it was detected in 543 out of 646 boots in
my testing:

 Measured 6277 cycles TSC warp between CPUs, turning off TSC clock.
 tsc: Marking TSC unstable due to check_tsc_sync_source failed

This is, however, just a heuristic. On Hyper-V platform there are two good
clocksources: MSR-based hyperv_clocksource and recently introduced TSC
page.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 arch/x86/kernel/cpu/mshyperv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index aad4bd8..6fd023d 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -141,6 +141,7 @@ static void __init ms_hyperv_init_platform(void)
 	no_timer_check = 1;
 #endif
 
+	mark_tsc_unstable("running on Hyper-V");
 }
 
 const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = {
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-21 15:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-19 16:54 [PATCH] hyper-v: mark TSC as unstable Vitaly Kuznetsov
2015-08-21  7:45 ` [tip:x86/platform] x86/hyperv: Mark the Hyper-V " tip-bot for Vitaly Kuznetsov
2015-08-21 14:34   ` Peter Zijlstra
2015-08-21 15:35     ` KY Srinivasan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox