Subject: Re: hardware clock 'corrupted' by ddb (and possibly other things)
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 07/11/2002 09:14:54
> 
> IMO, probably "The Right Thing" is to write the RTC "periodically" if
> running NTP and when shutting down the system (e.g. when your NTP
> daemon is killed after having been functioning correctly), and to
> write it whenver the system clock is explicitly set.

If you set RTC whenever the system clock is set (or maybe if it
hasn't been set 'recently' if NTP is setting it stupidly often)
then there is ABSOLUTLEY [1] no need to set it during shutdown.

Even if NTP wasn't running at shutdown, you will almost certainly
restart it on reboot - you need to do that to correct for
sub-second synchronisation anyway.

If sub-second synchronisation is (apparantly) required for builds
using NFS, then maybe NFS ought to be fixed to stop it comparing
client and server times (directory cache code).
OTOH I've always found that NFS build are only problematical when
the times deviate by tens of seconds.

I (and I guess many other people) are happy if the system time is
as accurate as their watch.  Stopping in DDB (or pressing the
'sleep' button on my PC) shouldn't clobber the RTC for the next boot.

	David

[1] apart from odd hardware like the pmax.

-- 
David Laight: david@l8s.co.uk