All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: always set the sched clock as unstable
@ 2012-04-13 18:20 ` David Vrabel
  0 siblings, 0 replies; 45+ messages in thread
From: David Vrabel @ 2012-04-13 18:20 UTC (permalink / raw)
  To: xen-devel
  Cc: David Vrabel, Konrad Rzeszutek Wilk, linux-kernel,
	Thomas Gleixner, Tim Deegan, Jan Beulich, Sheng Yang

From: David Vrabel <david.vrabel@citrix.com>

The sched clock was considered stable based on the capabilities of the
underlying hardware.  This does not make sense for Xen PV guests as:
a) the hardware TSC is not used directly as the clock source; and b)
guests may migrate to hosts with different hardware capabilities.

It is not clear to me whether the Xen clock source is supposed to be
stable and whether it should be stable across migration.  For a clock
source to be stable it must be: a) monotonic; c) synchronized across
CPUs; and c) constant rate.

There have also been reports of systems with apparently unstable
clocks where clearing sched_clock_stable has fixed problems with
migrated VMs hanging.

So, always set the sched clock as unstable when using the Xen clock
source.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
 arch/x86/xen/time.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index 0296a95..8469b5a 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -473,6 +473,7 @@ static void __init xen_time_init(void)
 	do_settimeofday(&tp);
 
 	setup_force_cpu_cap(X86_FEATURE_TSC);
+	sched_clock_stable = 0;
 
 	xen_setup_runstate_info(cpu);
 	xen_setup_timer(cpu);
-- 
1.7.2.5


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

end of thread, other threads:[~2012-04-17 15:43 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 18:20 [PATCH] xen: always set the sched clock as unstable David Vrabel
2012-04-13 18:20 ` David Vrabel
2012-04-13 18:31 ` Sheng Yang
2012-04-13 18:39   ` David Vrabel
2012-04-13 18:33 ` Sheng Yang
2012-04-16 11:32 ` Jan Beulich
2012-04-16 14:59   ` David Vrabel
2012-04-16 15:16     ` Tim Deegan
2012-04-16 15:16       ` Tim Deegan
2012-04-16 15:17     ` Konrad Rzeszutek Wilk
2012-04-16 15:17       ` Konrad Rzeszutek Wilk
2012-04-16 16:20       ` Dan Magenheimer
2012-04-16 16:20       ` [Xen-devel] " Dan Magenheimer
2012-04-16 16:05     ` Dan Magenheimer
2012-04-16 16:14       ` Jan Beulich
2012-04-16 16:14       ` [Xen-devel] " Jan Beulich
2012-04-16 17:22         ` Dan Magenheimer
2012-04-16 17:22         ` [Xen-devel] " Dan Magenheimer
2012-04-17  7:27           ` Jan Beulich
2012-04-17 15:36             ` Dan Magenheimer
2012-04-17 15:36             ` [Xen-devel] " Dan Magenheimer
2012-04-17  7:27           ` Jan Beulich
2012-04-16 16:26       ` David Vrabel
2012-04-16 16:26       ` [Xen-devel] " David Vrabel
2012-04-16 17:30         ` Dan Magenheimer
2012-04-16 17:30         ` [Xen-devel] " Dan Magenheimer
2012-04-17  7:47           ` Jan Beulich
2012-04-17  7:47           ` [Xen-devel] " Jan Beulich
2012-04-17 15:42             ` Dan Magenheimer
2012-04-17 15:42             ` Dan Magenheimer
2012-04-16 17:08       ` [Xen-devel] " Tim Deegan
2012-04-16 17:52         ` Dan Magenheimer
2012-04-16 18:17           ` Tim Deegan
2012-04-16 18:17           ` [Xen-devel] " Tim Deegan
2012-04-16 23:01             ` Sheng Yang
2012-04-16 23:01             ` [Xen-devel] " Sheng Yang
2012-04-17  0:29               ` Dan Magenheimer
2012-04-17  0:29               ` [Xen-devel] " Dan Magenheimer
2012-04-17  8:19               ` Tim Deegan
2012-04-17  8:19               ` [Xen-devel] " Tim Deegan
2012-04-16 17:52         ` Dan Magenheimer
2012-04-16 17:08       ` Tim Deegan
2012-04-16 16:05     ` Dan Magenheimer
2012-04-16 14:59   ` David Vrabel
2012-04-16 11:32 ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.