[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/3] xen/privcmd: add IOCTL_PRIVCMD_SYNC_WALLCLOCK to sync Xen's wallclock



On 12/10/12 15:29, Konrad Rzeszutek Wilk wrote:
> On Fri, Oct 12, 2012 at 10:02 AM, David Vrabel <david.vrabel@xxxxxxxxxx> 
> wrote:
>> On 12/10/12 14:41, Konrad Rzeszutek Wilk wrote:
>>> On Fri, Oct 12, 2012 at 01:57:14PM +0100, David Vrabel wrote:
>>>> From: David Vrabel <david.vrabel@xxxxxxxxxx>
>>>>
>>>> Add a new ioctl to synchronize Xen's wallclock with the current system
>>>> time.
>>>>
>>>> This may be used by the tools to ensure that newly created domains see
>>>> the correct wallclock time if NTP is not used in dom0 or if domains
>>>> are started before NTP has synchronized.
>>>
>>> So... how does this work with NTPD? As in does ntpd _not_ update the
>>> hwclock enough?
>>
>> Once NTPD is synchronized then the kernel updates the wallclock (and the
>> RTC with patch #1) every 11 mins.  I assume this is often enough given
>> how NTP adjusts the system time.
>>
>> You only really need the tools to sync wallclock if system time was
>> stepped at start of day.  e.g., init scripts could do something like:
>>
>> ntpdate pool.ntp.org
>> hwclock --systohc
>> xen-wallclock --systowc
> 
> I think I am missing something. The hwclock should end up in the
> xen_set_wallclock call. And from there on, the ntpd would update the
> wallclock if it got skewed enough? Or is the system time not calling
> the wall-clock enough? If that is the case, would just adding this in
> the crontab be enough:

hwclock talks to /dev/rtc which writes to the CMOS directly and does not
call update_persistent_clock() (or xen_set_wallclock()).

David

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.