WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Time stopped

To: David F Barrera <dfbp@xxxxxxxxxx>
Subject: Re: [Xen-devel] Time stopped
From: Steven Hand <Steven.Hand@xxxxxxxxxxxx>
Date: Fri, 14 Oct 2005 17:46:52 +0100
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stephan Böni <boeni@xxxxxx>
Delivery-date: Fri, 14 Oct 2005 16:44:22 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: Your message of "Fri, 14 Oct 2005 10:01:06 CDT." <1129302066.6440.16.camel@dbarrera_tp>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> On Fri, 2005-10-14 at 16:48 +0200, Stephan Böni wrote:
> > Just for your information. I have the same problem on my installation.
> > 
> Thanks for the feedback. I was wondering if I was the only one seeing
> it. 


So managed to reproduce (once!) and now perhaps one step further to 
solving it - basically the guest is /not/ to blame; Xen itself is 
not updating time correctly. In my instance it was out (i.e. time 
was running slower) by a factor of approximately 16 -- 20. 

I'm trying to reproduce again to get more details - but it'd be
helpful if folks could apply the below and, if they repro the 
problem: 

  (1) get serial console to Xen (i.e. hit 'Ctrl-A' three times) 
  (2) hit 'a' to dump the ac_timer queues and the scale info, 
  (3) post the results to the list 

cheers,

S.




diff -r bd3268de4145 xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Fri Oct 14 14:40:48 2005
+++ b/xen/arch/x86/time.c       Fri Oct 14 17:44:46 2005
@@ -133,6 +133,15 @@
     return product;
 }
 
+void print_scale(int cpu) 
+{
+    struct cpu_time *t = &cpu_time[cpu]; 
+    struct time_scale *s = &t->tsc_scale;
+
+    printk("CPU%d: scale->mul_frac = %x\n", cpu, s->mul_frac); 
+    printk("CPU%d: scale->shift    = %d\n", cpu, s->shift); 
+}
+
 void timer_interrupt(int irq, void *dev_id, struct cpu_user_regs *regs)
 {
     if ( timer_ack ) 
diff -r bd3268de4145 xen/common/ac_timer.c
--- a/xen/common/ac_timer.c     Fri Oct 14 14:40:48 2005
+++ b/xen/common/ac_timer.c     Fri Oct 14 17:44:46 2005
@@ -225,6 +225,7 @@
     spin_unlock_irq(&ac_timers[cpu].lock);
 }
 
+extern void print_scale(int cpu); 
 
 static void dump_timerq(unsigned char key)
 {
@@ -239,6 +240,7 @@
     for_each_online_cpu( i )
     {
         printk("CPU[%02d] ", i);
+        print_scale( i ); 
         spin_lock_irqsave(&ac_timers[i].lock, flags);
         for ( j = 1; j <= GET_HEAP_SIZE(ac_timers[i].heap); j++ )
         {

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel