]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.xen/832-ntp-interaction.patch
Updated xen patches taken from suse.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.xen / 832-ntp-interaction.patch
1 From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/c0f2f398aa3c
2 # HG changeset 832 patch
3 # User Keir Fraser <keir.fraser@citrix.com>
4 # Date 1237377065 0
5 # Node ID c0f2f398aa3cab195b632531447e95110e9d8282
6 # Parent c1f0373ff44ea3f9ba3845e05faf3d27d7d52731
7 Subject: x86: Fix interaction of NTP and dom0->xen time updates
8
9 Don't discard NTP sync when updating Xen wallclock time from dom0,
10 as that's almost the first thing we do when we become synced.
11 Move the call to ntp_clear() into do_settimeofday(), which is the
12 only caller of __update_wallclock() that looks like it should break
13 NTP sync.
14
15 This fixes the timer chain that sets Xen's wallclock every minute when
16 dom0 is NTP synced, which in turn greatly improves wallclock accuracy
17 in PV domU.
18
19 Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
20 Acked-by: jbeulich@novell.com
21
22 --- sle11-2009-03-24.orig/arch/x86/kernel/time_32-xen.c 2009-03-24 10:00:15.000000000 +0100
23 +++ sle11-2009-03-24/arch/x86/kernel/time_32-xen.c 2009-03-18 12:51:05.000000000 +0100
24 @@ -286,8 +286,6 @@ static void __update_wallclock(time_t se
25
26 set_normalized_timespec(&xtime, xtime_sec, xtime_nsec);
27 set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
28 -
29 - ntp_clear();
30 }
31
32 static void update_wallclock(void)
33 @@ -496,6 +494,7 @@ int do_settimeofday(struct timespec *tv)
34 __normalize_time(&sec, &nsec);
35 __update_wallclock(sec, nsec);
36 }
37 + ntp_clear();
38
39 /* Reset monotonic gettimeofday() timeval. */
40 spin_lock(&monotonic_lock);