lkml.org 
[lkml]   [1996]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectWhy touch the CMOS clock?

I noticed the 1.3.98 patch contains the following warning:

+Also, if the kernel time is synchronized with an external source, the
+kernel will write the time back to the CMOS clock every 11 minutes. In
+the process of doing this, the kernel briefly turns off RTC periodic
+interrupts, so be aware of this if you are doing serious work. If you
+don't synchronize the kernel time with an external source (via ntp or
+whatever) then the kernel will keep its hands off the RTC, allowing you
+exclusive access to the device for your applications.

My question is: Why does the kernel have to update the RTC? It is my
understanding that the kernel only reads the RTC at boot time and does its
timekeeping using the timer interrupt. (Correct me if I'm wrong.) Why can't
the RTC be left running on its own and the RTC time be used only as an
approximation of the real time of day when the machine is power-cycled? You
can't trust the RTC anyway if the machine is down for a longer period of
time.

Johan Myreen
jem@iki.fi


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.063 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site