| Re: [chrony-dev] [RFC PATCH v1 00/17] RFC: Patch enabling support for Linux auxiliary clocks |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: "Hall, Christopher S" <christopher.s.hall@xxxxxxxxx>
- Subject: Re: [chrony-dev] [RFC PATCH v1 00/17] RFC: Patch enabling support for Linux auxiliary clocks
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Wed, 13 May 2026 12:36:15 +0200
- Cc: "chrony-dev@xxxxxxxxxxxxxxxxxxxx" <chrony-dev@xxxxxxxxxxxxxxxxxxxx>, "Zage, David" <david.zage@xxxxxxxxx>, "Song, Yoong Siang" <yoong.siang.song@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778668584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Zyg1A96mkFocRpGQUPTwawcrQW468jOlcXP+QyQ8tNc=; b=Ykm7yljVtNsmGW2/8Pc62Fl+FHwbZU7LXS+ZBY5TIJ6RdzIGG4KHIZKRpgv5KQOqQln1qC zeIQ5EfAXofOr7oMuWbXCHynsgJSBRgg0wJxJkwbj4wW5DSsd7IkZy2UZjf/C7cwrdbIYb 2NsWfGmpAEAZpP4m4/gHhK4tC1xbsk0=
On Mon, Jan 12, 2026 at 04:52:40PM +0100, Miroslav Lichvar wrote:
> On Sat, Dec 13, 2025 at 02:41:01AM +0000, Hall, Christopher S wrote:
> > > There is also an older plan to support synchronization of PHCs, so the
> > > new configuration and code should be general enough to cover both PHCs
> > > and AUX clocks.
> >
> > What would this look like in terms of interface? Do we add a PHC to PHC mode
> > that does not set CLOCK_REALTIME? Is there any code written for this approach
> > that I can look at?
>
> There is an old hack that replaces the system clock with a single PHC:
> https://www.mail-archive.com/chrony-users@xxxxxxxxxxxxxxxxxxxx/msg01881.html
>
> That's not the right direction.
>
> What I'd like to see is a new directive that specifies a list of
> clocks that should be synchronized, e.g. CLOCK_REALTIME, CLOCK_AUX*,
> /dev/ptp*. It could be empty to use only CLOCK_MONOTONIC_RAW and be
> able to serve time, but not touching any clocks.
Here is a merge request implementing this feature:
https://gitlab.com/chrony/chrony/-/merge_requests/33
It's not finished yet, but I think it should work for the use case
of a single AUX clock that your patches covered. If you test it,
please let me know if it works as expected. Build it with the
--with-ntp-era=0 option if you need the clock to be near the epoch.
I'm planning to add an "offset" option to allow shifting the clock to
distant past.
The configuration looks like this:
clock SYS:AUX0 main
clock PHC:eth0
clock PHC:eth1
Not all combinations of SYS and PHC clocks are supported yet. If the
main clock is a system clock, only PHCs will be synchronized with it,
and vice versa.
SYS:MONOTONIC and SYS:MONOTONIC_RAW can be used as the main clock too.
Software timestamping works only with SYS:REALTIME (the default). With
other system clocks it will fall back to daemon timestamps. HW
timestamping works if the main clock is a system clock or the PHC on
the NIC, but not other PHCs.
For monitoring there is a new chronyc clocks command and clocks log.
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.