Date: Wed, 7 Apr 1999 21:53:14 +0200 From: Eivind Eklund <eivind@freebsd.org> To: Nick Sayer <nsayer@quack.kfu.com> Cc: hackers@freebsd.org Subject: Re: cvs commit: src/sys/kern kern_time.c Message-ID: <19990407215314.B75317@bitbox.follo.net> In-Reply-To: <199904071932.MAA38634@medusa.kfu.com>; from Nick Sayer on Wed, Apr 07, 1999 at 12:32:51PM -0700 References: <199904071924.MAA05436@apollo.backplane.com> <199904071932.MAA38634@medusa.kfu.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[Moved to -hackers] On Wed, Apr 07, 1999 at 12:32:51PM -0700, Nick Sayer wrote: > > :On Apr 7, 9:36am, Nick Sayer wrote: > > :} Subject: cvs commit: src/sys/kern kern_time.c > > : > > :} We still need to decide on an algorithm to clamp positive adjustments. > > :} As it stands, it is possible to achieve arbitrary negative adjustments > > :} by "wrapping" time around. > > : > > :Limit positive steps to MIN(1 second, elapsed time since last postive step). > > :At worst the clock could be made to run at 2x normal speed. > > I was looking at a much uglier version of the above, involving > having a 'step allowed' variable that gets cleared by the clock > interrupt or something, but the above looks much nicer. Let me > go to my little workshop. :-) I'd suggest going for at least a minute instead of a second, to allow re-adjustement after loosing an ntp server for a while. Possibly more; I've not thought too closely about this. It might be reasonable to do maxstep = MIN(1 minute, elapsed time since last positive step / 10) to keep the present "max 10% time adjustement" limitation. Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990407215314.B75317>