Subject: Re: todr changes to improve clock accuracy across sleeps & reboots
To: None <tech-kern@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-kern
Date: 09/09/2006 00:41:38
On Fri, 08 Sep 2006, Garrett D'Amore wrote:
> But the point is, while you're disconnected you don't care about the 20
> second drift.
>
> When you reconnect, you'll run ntp, and get an accurate clock again.

I do care, because ntp will take multiple hours to recover from a
20-second drift, if you have it configured to slew always (which is
not the default).

The small drift that you get while the system is running but not
connected to the net for a few hours is fine.  Drifts of large fractions
of a second caused by truncation to whole-second boundaries during
suspend/resume cycles are not fine, especially if there are several of
them.

This was enough of a problem for me that I hacked the ntp code to slew
the clock up to two orders of magnitude faster than it really wanted to.

> All that said, I don't mind waiting up to a second to get rid of the drift.

Yes, I'd gladly take a one-second delay on every
boot/suspend/resume/shutdown in order to have the
RTC more accurate.

--apb (Alan Barrett)