Re: PROBLEM: Linux updates RTC secretly when clock synchronizes

From: Russell King (rmk@arm.linux.org.uk)
Date: Wed Nov 07 2001 - 04:24:15 EST


On Wed, Nov 07, 2001 at 02:01:37AM +0100, Kurt Roeckx wrote:
> On Wed, Nov 07, 2001 at 12:44:21AM -0000, Alex Bligh - linux-kernel wrote:
> > --On Wednesday, 07 November, 2001 12:00 AM +0000 Riley Williams
> > <rhw@MemAlpha.cx> wrote:
> >
> > > 2. The kernel makes no internal reference to the /dev/rtc driver,
> > > and it is left to userland tools to sync to the RTC on boot,
> > > and at other times as required.
> >
> > I think the kernel should set the machine time to the RTC time
> > as an initializer on boot. Other than that, I agree.
>
> Which is something you do from userspace.

One problem with that approach is the things in kernel that need to be
initialised to a random value, such that on two consecutive boots, the
values are different. Currently, that's NFS XIDs. As Linux currently
stands, running on some embedded machines where there is no real time
clock, you can hit the possibility of file corruption if you happen to
reboot the machine twice in within two minutes - non-Linux NFS servers
could well be longer.

With your proposed change, you'd be inflicting that pain on all NFS root
machines, even ones with RTCs, so may I suggest that if you're thinking
about removing the RTC stuff that you also think of a way of solving this
problem at the same time?

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Nov 07 2001 - 21:00:34 EST