Subject: Re: todr changes to improve clock accuracy across sleeps & reboots
To: <>
From: Chapman Flack <>
List: tech-kern
Date: 09/08/2006 17:43:59
Perry E. Metzger wrote:
> Garrett D'Amore <> writes:
>>Yes, but again, you don't want to do that if the rtc actually has
>>subsecond precision.  Several do.

Just in the interest of generality, oughtn't we be thinking about
the test as "rtc has granularity >> sec/hz"? If it's subsecond but
still coarser than hz, we can still win by sleeping or scheduling
a callout for the transition. (And if finer than hz, we could still
spin for the transition.)

> that we have a few such, perhaps a device property should tell us
> whether we have only 1 second precision or not, and the test in
> todr_gettime and todr_settime could be based on that...

So more generally, maybe the device property should tell us /what/
the precision /is/. Based on that, the code can make a variety of
reasonable choices.