Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 2010 23:47:10 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Peter Jeremy <peterjeremy@acm.org>
Cc:        freebsd-hackers@FreeBSD.org, Andriy Gapon <avg@icyb.net.ua>
Subject:   Re: periodically save current time to time-of-day hardware
Message-ID:  <861vf6n1jl.fsf@ds4.des.no>
In-Reply-To: <20100326213022.GD32799@server.vk2pj.dyndns.org> (Peter Jeremy's message of "Sat, 27 Mar 2010 08:30:23 %2B1100")
References:  <4BACC791.70502@icyb.net.ua> <86zl1v84vy.fsf@ds4.des.no> <4BACD88E.2040803@icyb.net.ua> <86vdcj82qx.fsf@ds4.des.no> <20100326213022.GD32799@server.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Jeremy <peterjeremy@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
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?861vf6n1jl.fsf>