[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] x86: Fix interaction of NTP and dom0->xen time updates



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1237377065 0
# Node ID c0f2f398aa3cab195b632531447e95110e9d8282
# Parent  c1f0373ff44ea3f9ba3845e05faf3d27d7d52731
x86: Fix interaction of NTP and dom0->xen time updates

Don't discard NTP sync when updating Xen wallclock time from dom0,
as that's almost the first thing we do when we become synced.
Move the call to ntp_clear() into do_settimeofday(), which is the
only caller of __update_wallclock() that looks like it should break
NTP sync.

This fixes the timer chain that sets Xen's wallclock every minute when
dom0 is NTP synced, which in turn greatly improves wallclock accuracy
in PV domU.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
 arch/i386/kernel/time-xen.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -r c1f0373ff44e -r c0f2f398aa3c arch/i386/kernel/time-xen.c
--- a/arch/i386/kernel/time-xen.c       Wed Mar 18 11:45:30 2009 +0000
+++ b/arch/i386/kernel/time-xen.c       Wed Mar 18 11:51:05 2009 +0000
@@ -286,8 +286,6 @@ static void __update_wallclock(time_t se
 
        set_normalized_timespec(&xtime, xtime_sec, xtime_nsec);
        set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
-
-       ntp_clear();
 }
 
 static void update_wallclock(void)
@@ -496,6 +494,7 @@ int do_settimeofday(struct timespec *tv)
                __normalize_time(&sec, &nsec);
                __update_wallclock(sec, nsec);
        }
+       ntp_clear();
 
        /* Reset monotonic gettimeofday() timeval. */
        spin_lock(&monotonic_lock);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.