Subject: Re: todr changes to improve clock accuracy across sleeps & reboots
To: Perry E. Metzger <>
From: David Laight <>
List: tech-kern
Date: 09/09/2006 15:50:08
On Thu, Sep 07, 2006 at 11:04:31AM -0400, Perry E. Metzger wrote:
> Most of the battery backed up RTC chips in use have very coarse
> precision compared to the kernel. That is, they read out only to the
> nearest 1 second. They often have quite good accuracy, however.

Some of them also have 'trim' registers that can be set to improve
the long term accuracy.  So if the time is corrected, and you
remembered when it was last corrected, some simple maths [1] gives
an update for the trim register.

The current situation for systems not using NTP is stupid, we rewrite
the time from a low-quality uncalibrated source (the system clock)
over that of a device that is meant to have reasonable long term


[1] easy to get backwards!

David Laight: