Bcc:
Subject: Re: [PATCH 2/3] timekeeping: sync persistent clock and RTC on system time step changes Reply-To:
Hi David,
Quoted 37 lines
From: David Vrabel <[email protected]>
Date: 2013/5/14
Subject: Re: [PATCH 2/3] timekeeping: sync persistent clock and RTC on system time step changes
To: John Stultz <[email protected]>
Cc: "[email protected]" <[email protected]>, Konrad Rzeszutek Wilk <[email protected]>, Thomas Gleixner <[email protected]>, "[email protected]" <[email protected]>Quoted 12 lines · John Stultz
Quoted 11 lines · David Vrabel
From: David Vrabel <[email protected]>
The persistent clock or the RTC is only synchronized with system time every 11 minutes if NTP is running. This gives a window where the persistent clock may be incorrect after a step change in the time (such as on first boot).
This particularly affects Xen guests as until an update to the control domain's persistent clock, new guests will start with the incorrect system time.
Quoted 7 lines
Quoted 3 lines
When there is a step change in the system time, call
update_persistent_clockorrtc_set_ntp_time()to synchronize the persistent clock or RTC to the new system time.I'm sorry, this isn't quite making sense to me. Could you further describe the exact problematic behavior you're seeing here, and why its a problem?
The Xen wallclock is used as the persistent clock for Xen guests. This is initialized (by Xen) with the CMOS RTC at the start of day. If the RTC is incorrect then guests will see an incorrect wallclock time until dom0 has corrected it.
Quoted 6 lines
Currently dom0 only updates the Xen wallclock with the 11 min periodic work when NTP is synced. This leaves a window where newly started guests will see an incorrect wallclock time. This can cause guests to fail to start correctly if the wallclock is now behind what it was when the guest last started. (e.g., fsck of its disk fails as its last mount time appears to be far into the future).
Is it possible for Xen to resync its wallclock time from the RTC device whenever it gets a request of starting a new guest? as usually a new guest OS needs to get the time base from Xen's wallclock anyway.
Thanks,
Feng