Re: [chrony-users] Synchronizing PHCs in addition to system clock |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
> Are there any plans for making chrony also synchronize the NIC PHCs? It
> seems to me that NIC PHCs are become more prevalent and the only way to
> reliably synchronize them to the system clock is to have the system wide
> clock servo (NTP or chrony) perform that task.
It would be a nice feature. It's on my todo list, but low priority
currently. There are few different ways how it could be done and each
has some drawbacks.
1) new hwtimestamp option to synchronize the PHC to system clock
- stability of the PHC will not be best as it is impacted by the
stability of the system clock and PCIe latency
2) new hwtimestamp option to synchronize the PHC to NTP sources (or
refclocks) available on that interface and synchronize the system
clock to the PHC
- difficult to implement support for the general case where
different sources are on different interfaces (e.g. source
selection/combining is tricky)
3) new option to synchronize a PHC instead of the system clock,
replacing it in all time operations
- worse accuracy with sources on interfaces not using the specified
PHC (no kernel timestamping)
- separate chronyd instance (using PHC refclock) is needed for
synchronization of the system clock
I've been experimenting with 3). I'm attaching a patch (or rather a
quick hack making some shortcuts in the code) if you would like to
test it. There is a -c option to specify a /dev/ptp device. HW
timestamping must be enabled only the interface using that clock.
In my tests it worked very well. My use case was a super stable server
using a PHC synchronized to PPS signal connected to its input.
--
Miroslav Lichvar