linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv6 0/5] xen: maintain an accurate persistent clock in more cases
@ 2013-06-27 10:35 David Vrabel
  2013-06-27 10:35 ` [PATCH 1/5] hrtimers: support resuming with two or more CPUs online (but stopped) David Vrabel
                   ` (5 more replies)
  0 siblings, 6 replies; 36+ messages in thread
From: David Vrabel @ 2013-06-27 10:35 UTC (permalink / raw)
  To: xen-devel
  Cc: David Vrabel, Konrad Rzeszutek Wilk, linux-kernel, John Stultz,
	Thomas Gleixner

Xen guests use the Xen wallclock as their persistent clock.  This is a
software only clock in the hypervisor that is used by guests instead
of a real hardware RTC.

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 but not dom0
  itself.

These limitations mean that guests started before NTP is synchronized
will start with an incorrect wallclock time and the hardware RTC will
not be updated (as on bare metal).

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

Changes in v6:

Fix hrtimers_resume() to handle resuming with two or more online CPUs
instead of adding a hrtimers_late_resume().  Add a flag to the
pvclock_gtod notififcations for the clock being set and go back to
using this to sync the Xen wallclock.

Changes in v5:

Dropped the change to disable non-boot CPUs during suspend on Xen as
migration downtime was too poor.  Instead, provide
hrtimers_late_resume() for use by Xen's resume code to replace the
call of clock_was_set().  Fix two unused variable warnings.

Changes in v4:

Add a new clock_was_set notifier chain. Use this instead of direct
calls to clock_was_set() from the timekeeping code.  Use this notifier
and a new timer to synchronize the Xen wallclock.

Changes in v3:

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

Changes in v2:

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


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2013-07-05 13:51 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-27 10:35 [PATCHv6 0/5] xen: maintain an accurate persistent clock in more cases David Vrabel
2013-06-27 10:35 ` [PATCH 1/5] hrtimers: support resuming with two or more CPUs online (but stopped) David Vrabel
2013-06-28 21:18   ` [tip:timers/core] hrtimers: Support " tip-bot for David Vrabel
2013-07-05  9:30     ` Artem Savkov
2013-07-05 10:07       ` David Vrabel
2013-07-05 10:10         ` Thomas Gleixner
2013-07-05 10:25         ` Thomas Gleixner
2013-07-05 10:36           ` Thomas Gleixner
2013-07-05 10:45             ` Artem Savkov
2013-07-05 13:26               ` Thomas Gleixner
2013-07-05 10:38           ` Artem Savkov
2013-07-05 13:46           ` David Vrabel
2013-07-05 13:51             ` Thomas Gleixner
2013-07-05 10:09       ` Thomas Gleixner
2013-06-28 21:18   ` [tip:timers/core] xen: Remove clock_was_set() call in the resume path tip-bot for David Vrabel
2013-06-27 10:35 ` [PATCH 2/5] time: pass flags instead of multiple bools to timekeeping_update() David Vrabel
2013-06-27 17:39   ` John Stultz
2013-06-28 21:18   ` [tip:timers/core] timekeeping: Pass " tip-bot for David Vrabel
2013-06-27 10:35 ` [PATCH 3/5] time: indicate that the clock was set in the pvclock gtod notifier chain David Vrabel
2013-06-27 17:37   ` John Stultz
2013-06-28 10:20     ` David Vrabel
2013-06-28 21:19   ` [tip:timers/core] timekeeping: Indicate that clock was set in the pvclock gtod notifier tip-bot for David Vrabel
2013-06-27 10:35 ` [PATCH 4/5] x86/xen: sync the wallclock when the system time is set David Vrabel
2013-06-28 21:19   ` [tip:timers/core] x86: xen: Sync " tip-bot for David Vrabel
2013-06-27 10:35 ` [PATCH 5/5] x86/xen: sync the CMOS RTC as well as the Xen wallclock David Vrabel
2013-06-28 15:38   ` Thomas Gleixner
2013-06-28 15:49     ` David Vrabel
2013-06-28 16:09       ` Thomas Gleixner
2013-06-28 16:51         ` David Vrabel
2013-06-28 20:41           ` Thomas Gleixner
2013-06-28 21:19   ` [tip:timers/core] x86: xen: Sync " tip-bot for David Vrabel
2013-06-28 13:14 ` [PATCHv6 0/5] xen: maintain an accurate persistent clock in more cases Thomas Gleixner
2013-06-28 15:01   ` Konrad Rzeszutek Wilk
2013-06-28 15:12     ` Thomas Gleixner
2013-06-28 16:19       ` Konrad Rzeszutek Wilk
2013-06-28 18:58         ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).