periodically save current time to time-of-day hardware
Dag-Erling Smørgrav
des at des.no
Fri Mar 26 22:47:12 UTC 2010
Peter Jeremy <peterjeremy at acm.org> writes:
> At least some versions of Linux also save a RTC drift approximation
> and "last set" timestamp whenever the RTC is updated. This allows the
> kernel to better set the system clock from the RTC at boot (ie, our
> inittodr()). The downside is that this needs to store 8-16 bytes of
> state somewhere non-volatile. Linux does this using an external
> program and a file - but finding a location for a regularly updated
> file that is read very early in the rc.d sequence might be problematic.
We already do something similar for entropy.
> that it _is_ updated. This suggests that an alternative approach
> would be for adjtime() / ntp_adjtime() to directly call resettodr() if
> it's more than P minutes since resettodr() was last called.
...if we want something like Linux's eleven-minute-mode.
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the freebsd-hackers
mailing list