Re: [chrony-dev] [RFC] Transparent fallback from NTP reference clock to RTC |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
On 7/2/25 15:08, Miroslav Lichvar wrote:
> On Wed, Jul 02, 2025 at 02:55:02PM +0200, Ahmad Fatoum wrote:
>>> chronyd does not set the STA_UNSYNC flag when it loses its upstream
>>> sources.
>>
>> Oh. Then I have trouble understanding the code in set_sync_status, which
>> compares max_error against MAX_SYNC_ERROR (== 16s) as it looks like that
>> would cause STA_UNSYNC to be set once the threshold is exceeded.
>
> 16 seconds is the maximum value that the kernel can keep as esterror
> and maxerror. It would automatically set the STA_UNSYNC flag if the
> application didn't set it. Normally, if the clock is well
> synchronized, it takes a few days for that threshold to be reached. I
> assume you are interested in much shorter intervals.
I see. I think the relevant Linux kernel code would be the check against
NTP_PHASE_LIMIT in kernel/time/timekeeping.c second_overflow().
Do you think it can make sense to set STA_UNSYNC in chrony when NTP is
unreachable in some situations or should rtcsync be just refused always
in favor of rtcfile when RTC local refclock is used?
Thanks very much,
Ahmad
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
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.