Re: [chrony-dev] Let the kernel write the sys clock to RTC

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Fri, 14 May 2010, Piotr Grudzinski wrote:

> 2. The kernel writes to RTC at a 0.5 second mark so the error can be > minimize in case of
>  power outage and no access to NTP servers.

 No idea what you mean here. Yes, in order to write to the rtc, you have to
 stagger the write because the rtc is weird. But what has this to do with
 your
 desire that the kernel write to it every 11 min. chrony handles the rtc
 properly


I don't know why the 0.5 second mark was selected but - for RTCs keeping
time with a resolution of 1 second - it seems to be a better solution than
writing to RTC at a random point within one second.
And I don't think 11 min and 0.5 sec are related at all.

The way that the rtc is set up is that it actually turns over the second
exactly .5 secd after you write the time to the rtc. Some weirdness of the rtc
chip they used in PCs. The 11 min rule was something that Mills introduced
into the kernel time algorithm to try to keep the rtc in step with the real
time. It was done without any idea of calibrating the drift of the rtc, which
was surprizing since compensating for drift was  essentially the whole purpose
of ntp which he developed.
So yes, they have nothing to do with each other.


> > 3. In an extreme case, the only permanent storage, with r/w access, is a > small
>  NVRAM in RTC. The estimated system clock error/drift ca be stored there.

 No, there is no linux way of putting the drift rate into the rtc that I
 know
 of.

I read it from NVRAM and create a drift file in a RAM FS for chronyd
to use and vice versa.

OK. But then the 11 min rule is a disaster.
(I assume you are talking about the drift of the rtc, not of the system clock)


---
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.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/