xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Konrad Rzeszutek Wilk <konrad@kernel.org>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH 3/3] xen/privcmd: add IOCTL_PRIVCMD_SYNC_WALLCLOCK to sync Xen's wallclock
Date: Fri, 12 Oct 2012 15:59:25 +0100	[thread overview]
Message-ID: <5078304D.1050807@citrix.com> (raw)
In-Reply-To: <CACJDEmr3V71cSdV3+i-n7=wfOnDBza04Lk+6+B6Fyx7LhQrdEg@mail.gmail.com>

On 12/10/12 15:29, Konrad Rzeszutek Wilk wrote:
> On Fri, Oct 12, 2012 at 10:02 AM, David Vrabel <david.vrabel@citrix.com> 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@citrix.com>
>>>>
>>>> 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

  reply	other threads:[~2012-10-12 14:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-12 12:57 [PATCH 0/3] xen: fix various wallclock problems David Vrabel
2012-10-12 12:57 ` [PATCH 1/3] xen: sync the CMOS RTC as well as the Xen wallclock David Vrabel
2012-10-12 14:57   ` Konrad Rzeszutek Wilk
2012-10-12 16:13     ` David Vrabel
2012-10-12 12:57 ` [PATCH 2/3] xen: add correct 500 ms offset when setting " David Vrabel
2012-10-15  9:25   ` Ian Campbell
2012-10-15 12:21     ` David Vrabel
2012-10-15 12:27       ` Ian Campbell
2012-10-12 12:57 ` [PATCH 3/3] xen/privcmd: add IOCTL_PRIVCMD_SYNC_WALLCLOCK to sync Xen's wallclock David Vrabel
2012-10-12 13:41   ` Konrad Rzeszutek Wilk
2012-10-12 14:02     ` David Vrabel
2012-10-12 14:29       ` Konrad Rzeszutek Wilk
2012-10-12 14:59         ` David Vrabel [this message]
2012-10-12 15:02           ` Konrad Rzeszutek Wilk
2012-10-12 16:14             ` David Vrabel
2012-10-12 16:16               ` Konrad Rzeszutek Wilk
2012-10-12 16:30                 ` David Vrabel
2012-10-12 16:25 ` [PATCH 0/3] xen: fix various wallclock problems David Vrabel
2012-10-15  9:26   ` Ian Campbell
2012-10-15 12:23     ` David Vrabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5078304D.1050807@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=konrad@kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).