lkml.org 
[lkml]   [2013]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCHv3 0/2] xen: maintain an accurate persistent clock in more cases
Date
The kernel has limited support for updating the persistent clock or
RTC when NTP is synced. This has the following limitations:

* The persistent clock is not updated on step changes. This leaves a
window where it will be incorrect (while NTP resyncs).

* Xen guests use the Xen wallclock as their persistent clock. dom0
maintains this clock so it is persistent for domUs and not dom0
itself.

These series fixes the above limitations and depends on "x86: increase
precision of x86_platform.get/set_wallclock()" which was previously
posted.

[ On a related note, with CONFIG_HZ=1000 sync_cmos_clock() is always
scheduled ~3ms too late which causes it to repeatedly try to
reschedule in ~997 ms and ends up never calling
updated_persistent_clock(). With HZ=250, the error is ~1ms too late
which is close enough.

It is not clear where this systematic error comes from or whether
this is only a Xen specific bug. I don't have time to investigate
right now. ]

Changes since v2:

Don't peek at the timekeeper internals (use __current_kernel_time()
instead). Use the native set_wallclock hook in dom0.

Changes since v1:

Reworked to use the pvclock_gtod notifier to sync the wallclock (this
looked similar to what a KVM host does). update_persistent_clock()
will now only update the CMOS RTC.

David

[1] http://lists.xen.org/archives/html/xen-devel/2013-05/msg01402.html



\
 
 \ /
  Last update: 2013-05-30 17:41    [W:0.079 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site