lkml.org 
[lkml]   [1996]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Why touch the CMOS clock?
On  8 May 96 at 15:13, Johan Myréen wrote:

> On Wed, 8 May 1996, Ulrich Windl wrote:
>
> > On 6 May 96 at 14:21, Johan Myréen wrote:
> >
> > > My question is: Why does the kernel have to update the RTC? It is my
[...]
> > > 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.
> >
> > The RTC usually is more precise than the interrupt driven clock.
>
> True. But the CMOS clock isn't used for timekeeping in the kernel. It is only
> read at boot time to initialize the system time. The only reason to update
> the CMOS clock periodically is so it can be used more accurately to
> initialize the system time at the next boot. Setting the CMOS clock is not
> essential in synchronizing the system time with an external source.
>
> > In Addidion as long as the RTC runs local time, you will have to change
> > it when entering/leaving DST.
>
> The clock on Unix machines traditionally runs UTC. Setting the RTC to local
> time is just a hack to keep DOS users happy, not a high priority, IMHO...

As long as most PC systems (DOS, OS/2, Win95) use RTC with local time, I'll have to do
that in Linux, too.

>
> > I think the RTC should be updated, even when the hardware is somewhat
> > broken: Setting the time shouldn't affect periodic interrupts.
>
> No it shouldn't, but if it _does_ make the interrupts unreliable, I'd say
> the CMOS clock updating code should be removed.

The easiest fix is not using NTP. Clock not synchronized --> Not RTC
updates. Can't we add a CONFIG variable or some ioctl, or something
like that.

BTW: I had synchronized a PC's clock for many days, even during
transition to DST, but after reboot the time was off by one hour.
I've reported that problem once, but it has not been fixed yet. Maybe
I'll try to make a patch.

>
> --
> Johan Myreen
> jem@iki.fi
Ulrich


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