[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170118161451.GA8148@potion>
Date: Wed, 18 Jan 2017 17:14:51 +0100
From: Radim Krcmar <rkrcmar@...hat.com>
To: Miroslav Lichvar <mlichvar@...hat.com>
Cc: Marcelo Tosatti <mtosatti@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Richard Cochran <richardcochran@...il.com>
Subject: Re: [patch 3/3] PTP: add kvm PTP driver
2017-01-18 16:54+0100, Miroslav Lichvar:
> On Wed, Jan 18, 2017 at 12:24:09PM -0200, Marcelo Tosatti wrote:
>> On Wed, Jan 18, 2017 at 01:46:58PM +0100, Paolo Bonzini wrote:
>> > I'd rather use PTP_SYS_OFFSET_PRECISE instead, but unfortunately chrony
>> > does not support it---but I would still prefer you to support
>> > PTP_SYS_OFFSET_PRECISE as well.
>>
>> Sure, I'll check if it makes sense to implement PTP_SYS_OFFSET_PRECISE for
>> KVM case.
>
> But is it really so precise that the application can safely assume
> there are no errors due to asymmetric delays, etc? I think
> PTP_SYS_OFFSET_PRECISE should be supported only if the accuracy of
> the offset measured between the HW and system clock is not worse than
> the precision of the system clock (typically few tens of nanoseconds).
KVM is actually the perfect user of PTP_SYS_OFFSET_PRECISE: the host and
guest system clocks use the same hardware clock.
(We want to copy the host data about the clock to the guest, and we just
happen to use PTP for that.)
> It would be good to verify the accuracy of the offset when the host
> and guest clocks are synchronised to each other over PTP using two
> NICs with HW timestamping.
We can verify the accuracy just by reading the host time and tsc
computing guest time from that tsc -- they should be equal.
Well, we don't give host frequency to the guest, but I hope that the
guest can compute it accurately after polling the host few times.
(Still, a room for improvement.)
NICs with HW timestamping would be a bit more complicated to set up. :)
Powered by blists - more mailing lists