Re: [chrony-dev] [RFC] Transparent fallback from NTP reference clock to RTC

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Mon, Mar 24, 2025 at 04:26:31PM +0100, Ahmad Fatoum wrote:
>   - The kernel allows only one process to open /dev/rtc at a time.
>     Chrony should gain an IPC command by which chronyc can set the time
>     on the RTC, when used as reference clock.
> 
>   - Setting the time this way, discards all samples and then sampling
>     starts fresh with a clean slate
> 
>   - The RTC reference clock should only be selected, when there are no
>     other usable non-RTC reference clocks
> 
>   - The 11-minute kernel programming of the RTC must always be disabled,
>     once a RTC reference clock has been initialized
> 
>   - rtcsync when the RTC is a selected reference clock should be a no-op
> 
>   - rtcsync when the RTC is _not_ the selected reference clock should
>     periodically program the time into the RTC like the kernel usually
>     does, once the drift exceeds a threshold

This looks like a significant complication. I prefer to keeps things
simple if possible, avoiding fallbacks and switching between different
modes of operation.

Have you considered using the local option for the RTC refclock? I.e.
use it only for stabilization of the system clock, not as a time
source. That would work even when it's synchronizing to NTP servers.
When NTP is not reachable, it would activate the local reference as
configured by the local directive. I guess something would be needed
for the case when it's started without NTP.

-- 
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.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/