Re: [chrony-dev] [RFC] Transparent fallback from NTP reference clock to RTC |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [RFC] Transparent fallback from NTP reference clock to RTC
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Tue, 25 Mar 2025 14:46:44 +0100
- Cc: Jan Lübbe <jlu@xxxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1742910411; 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=6Id3jnU+mI88md51Gdi1bQjWfUUao3f9UV6XdDze8kM=; b=FXac/ZL0ZWgVCmWH1OiDO17z4oxB/Yin78rN//tkRDeloTAGCzR8qAg83ECS/qB8Px9nhy XnugXZE2xN8K1n+UCc9PY87lzl2eIMWxlBloLxo/ZbvFMluJvdGHNz737ruUS4THs7q3Zk d6tw9bKwDxbtLA2VmsU4qJVMSFRSU/I=
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.