Subject: SunOS dosyntodr (RTC chip)
To: None <port-mac68k@NetBSD.ORG>
From: Denny Gentry <denny1@home.com>
List: port-mac68k
Date: 01/29/1997 08:32:51
SunOS on sparc has a similar (though less severe) problem as
NetBSD/mac68K: the clock interrupts at level 10, while the serial
ports interrupt at level 12 and the watchdog timer at level 14.
Especially during heavy floppy activity clock interrupts could
be missed.
So every 30 seconds SunOS would read from the TOD chip and
correct its time. Solaris reads it out once per second (the TOD chip
in Sparcstations has 10 msec resolution). However this sudden
change in the time wreaks havoc with ntp, so there is a
kernel variable named "dosynctodr" which can turn this off.
Given the prevelence of ntp today I do not think we should make
the kernel start reading from the TOD chip like SunOS does. However
even with Scott's recent changes, I think we should do something
to improve timekeeping. I would suggest the following:
1) Write a driver to read out the time from the chip (say /dev/rtc).
2) Teach xntpd to use /dev/rtc as a reference clock (similar to
its current local clock hack, but done with a driver instead).
Document that it should be made stratum 15.
3) Write a daemon we could ship with NetBSD for sites not using
ntp, which would sleep for several minutes then read /dev/rtc and
call adjtime().
-- Denny