[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] repeatable time jump
> > " always turned out to be 71 minutes 35 seconds, which is 2^32 > " usec.] > > Huh, thats right. I'm seeing a 4294 second jump on the hosts that jump an > hour. > It happens with both xm shutdown and xm destroy. OK, this bug is now officially annoying me. I've checked in a tiny fix I spotted in a code review, but I doubt it will solve the problem. I think the easiest way to solve it since we can't reproduce locally is to apply tracing. David: please can you apply the following patch to linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c and see what comes out when you run your test. It's also interesting to see what output comes out after the time skip whenever you run date. Thanks, Ian --- /usr/groups/xeno/BK/xeno.bk/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c 2004-09-30 21:14:58.000000000 +0100 +++ linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c 2004-09-30 21:28:09.000000000 +0100 @@ -114,28 +114,34 @@ #define NS_PER_TICK (1000000000ULL/HZ) -#define HANDLE_USEC_UNDERFLOW(_tv) do { \ +#define HANDLE_USEC_UNDERFLOW(_tv) do { int i=0; \ while ((_tv).tv_usec < 0) { \ (_tv).tv_usec += USEC_PER_SEC; \ (_tv).tv_sec--; \ - } \ + }if(i>100)printk(KERN_ALERT"USEC_UNDER %d\n",i); \ } while (0) -#define HANDLE_USEC_OVERFLOW(_tv) do { \ +#define HANDLE_USEC_OVERFLOW(_tv) do { int i=0; \ while ((_tv).tv_usec >= USEC_PER_SEC) { \ (_tv).tv_usec -= USEC_PER_SEC; \ - (_tv).tv_sec++; \ - } \ + (_tv).tv_sec++; i++; \ + }if(i>100)printk(KERN_ALERT"USEC_OVER %d\n",i); \ } while (0) static inline void __normalize_time(time_t *sec, s64 *nsec) { +int i=0,j=0; while (*nsec >= NSEC_PER_SEC) { (*nsec) -= NSEC_PER_SEC; (*sec)++; + i++; } while (*nsec < 0) { (*nsec) += NSEC_PER_SEC; (*sec)--; + j++; } + +if( i>100 || j>100 ) printk(KERN_ALERT"normalize time %d %d\n",i,j); + } /* Does this guest OS track Xen time, or set its wall clock independently? */ @@ -155,6 +161,8 @@ */ static void __get_time_values_from_xen(void) { +long last = shadow_tv.tv_sec; + shared_info_t *s = HYPERVISOR_shared_info; do { @@ -169,6 +177,7 @@ while (shadow_time_version != s->time_version1); cur_timer->mark_offset(); +if( shadow_tv.tv_sec-last > 600 ) printk(KERN_ALERT"**** __get_time_values_from_xen(void) JUPMED!\n"); } #define TIME_VALUES_UP_TO_DATE \ @@ -241,6 +250,7 @@ ((sec == last_seen_tv.tv_sec) && (usec < last_seen_tv.tv_usec))) { sec = last_seen_tv.tv_sec; usec = last_seen_tv.tv_usec; +printk(KERN_ALERT"Clamp time %ld %ld\n",sec,last_seen_tv.tv_sec); } else { last_seen_tv.tv_sec = sec; last_seen_tv.tv_usec = usec; ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |