Re: [PATCH RFC] hv_utils: implement Hyper-V PTP source

2017-01-17 Thread Vitaly Kuznetsov
Thomas Gleixner writes: > On Fri, 13 Jan 2017, Vitaly Kuznetsov wrote: >> With TimeSync version 4 protocol support we started updating system time >> continuously through the whole lifetime of Hyper-V guests. Every 5 seconds >> there is a time sample from the host which

Re: [PATCH RFC] hv_utils: implement Hyper-V PTP source

2017-01-16 Thread Thomas Gleixner
On Fri, 13 Jan 2017, Vitaly Kuznetsov wrote: > With TimeSync version 4 protocol support we started updating system time > continuously through the whole lifetime of Hyper-V guests. Every 5 seconds > there is a time sample from the host which triggers do_settimeofday[64](). > While the time from

Re: [PATCH RFC] hv_utils: implement Hyper-V PTP source

2017-01-13 Thread Vitaly Kuznetsov
Richard Cochran writes: >> +struct ptp_clock_info ptp_hyperv_info = { >> +.name = "hyperv", >> +.enable = hv_ptp_enable, >> +.gettime64 = hv_ptp_gettime, > > The code in drivers/ptp/ptp_clock.c calls > > .adjfreq (or adjfine) >

Re: [PATCH RFC] hv_utils: implement Hyper-V PTP source

2017-01-13 Thread Vitaly Kuznetsov
Olaf Hering writes: > On Fri, Jan 13, Vitaly Kuznetsov wrote: > >> +hv_ptp_clock = ptp_clock_register(_hyperv_info, NULL); >> +if (IS_ERR(hv_ptp_clock)) { > > Should that be IS_ERR_OR_NULL to catch "!IS_REACHABLE(CONFIG_PTP_1588_CLOCK)"? > Oh, yes. I missed the case when

Re: [PATCH RFC] hv_utils: implement Hyper-V PTP source

2017-01-13 Thread Olaf Hering
On Fri, Jan 13, Vitaly Kuznetsov wrote: > + hv_ptp_clock = ptp_clock_register(_hyperv_info, NULL); > + if (IS_ERR(hv_ptp_clock)) { Should that be IS_ERR_OR_NULL to catch "!IS_REACHABLE(CONFIG_PTP_1588_CLOCK)"? Olaf signature.asc Description: PGP signature

Re: [PATCH RFC] hv_utils: implement Hyper-V PTP source

2017-01-13 Thread Richard Cochran
On Fri, Jan 13, 2017 at 02:05:43PM +0100, Vitaly Kuznetsov wrote: > Instead of doing in-kernel time adjustments offload the work to an > NTP client by exposing TimeSync messages as a PTP device. Users my now > decide what they want to use as a source. > > I tested the solution with chrony, the

[PATCH RFC] hv_utils: implement Hyper-V PTP source

2017-01-13 Thread Vitaly Kuznetsov
With TimeSync version 4 protocol support we started updating system time continuously through the whole lifetime of Hyper-V guests. Every 5 seconds there is a time sample from the host which triggers do_settimeofday[64](). While the time from the host is very accurate such adjustments may cause