Go to file
Vitaly Kuznetsov 3716a49a81 hv_utils: implement Hyper-V PTP source
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
issues:
- Time is jumping forward and backward, some applications may misbehave.
- In case an NTP server runs in parallel and uses something else for time
  sync (network, PTP,...) system time will never converge.
- Systemd starts annoying you by printing "Time has been changed" every 5
  seconds to the system log.

Instead of doing in-kernel time adjustments offload the work to an
NTP client by exposing TimeSync messages as a PTP device. Users may now
decide what they want to use as a source.

I tested the solution with chrony, the config was:

 refclock PHC /dev/ptp0 poll 3 dpoll -2 offset 0

The result I'm seeing is accurate enough, the time delta between the guest
and the host is almost always within [-10us, +10us], the in-kernel solution
was giving us comparable results.

I also tried implementing PPS device instead of PTP by using not currently
used Hyper-V synthetic timers (we use only one of four for clockevent) but
with PPS source only chrony wasn't able to give me the required accuracy,
the delta often more that 100us.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-10 15:40:19 +01:00
arch hv: export current Hyper-V clocksource 2017-02-10 15:40:19 +01:00
block
certs
crypto
Documentation fpga: Add scatterlist based programming 2017-02-10 15:20:44 +01:00
drivers hv_utils: implement Hyper-V PTP source 2017-02-10 15:40:19 +01:00
firmware
fs fs: break out of iomap_file_buffered_write on fatal signals 2017-02-03 14:13:19 -08:00
include fpga: Add scatterlist based programming 2017-02-10 15:20:44 +01:00
init Merge 4.10-rc7 into char-misc-next 2017-02-06 09:39:13 +01:00
ipc
kernel Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-02-04 12:18:01 -08:00
lib Merge 4.10-rc7 into char-misc-next 2017-02-06 09:39:13 +01:00
mm mm, fs: check for fatal signals in do_generic_file_read() 2017-02-03 14:13:19 -08:00
net Three more miscellaneous nfsd bugfixes. 2017-02-02 12:49:58 -08:00
samples
scripts Merge 4.10-rc7 into char-misc-next 2017-02-06 09:39:13 +01:00
security
sound
tools Merge 4.10-rc7 into char-misc-next 2017-02-06 09:39:13 +01:00
usr
virt
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Merge 4.10-rc7 into char-misc-next 2017-02-06 09:39:13 +01:00
Makefile Linux 4.10-rc7 2017-02-05 15:10:58 -08:00
README

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.