ia64/linux-2.6.18-xen.hg

changeset 832:c0f2f398aa3c

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@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Mar 18 11:51:05 2009 +0000 (2009-03-18)
parents c1f0373ff44e
children ddb6d2257ec4
files arch/i386/kernel/time-xen.c
line diff
     1.1 --- a/arch/i386/kernel/time-xen.c	Wed Mar 18 11:45:30 2009 +0000
     1.2 +++ b/arch/i386/kernel/time-xen.c	Wed Mar 18 11:51:05 2009 +0000
     1.3 @@ -286,8 +286,6 @@ static void __update_wallclock(time_t se
     1.4  
     1.5  	set_normalized_timespec(&xtime, xtime_sec, xtime_nsec);
     1.6  	set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
     1.7 -
     1.8 -	ntp_clear();
     1.9  }
    1.10  
    1.11  static void update_wallclock(void)
    1.12 @@ -496,6 +494,7 @@ int do_settimeofday(struct timespec *tv)
    1.13  		__normalize_time(&sec, &nsec);
    1.14  		__update_wallclock(sec, nsec);
    1.15  	}
    1.16 +	ntp_clear();
    1.17  
    1.18  	/* Reset monotonic gettimeofday() timeval. */
    1.19  	spin_lock(&monotonic_lock);