Date: Mon, 15 Apr 2002 05:23:12 -0700 (PDT) From: Poul-Henning Kamp <phk@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/sys kernel.h src/sys/kern kern_ntptime.c kern_tc.c kern_time.c subr_param.c Message-ID: <200204151223.g3FCNCB10848@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
phk 2002/04/15 05:23:12 PDT Modified files: sys/sys kernel.h sys/kern kern_ntptime.c kern_tc.c kern_time.c subr_param.c Log: Improve the implementation of adjtime(2). Apply the change as a continuous slew rather than as a series of discrete steps and make it possible to adjust arbitraryly huge amounts of time in either direction. In practice this is done by hooking into the same once-per-second loop as the NTP PLL and setting a suitable frequency offset deducting the amount slewed from the remainder. If the remaining delta is larger than 1 second we slew at 5000PPM (5msec/sec), for a delta less than a second we slew at 500PPM (500usec/sec) and for the last one second period we will slew at whatever rate (less than 500PPM) it takes to eliminate the delta entirely. The old implementation stepped the clock a number of microseconds every HZ to acheive the same effect, using the same rates of change. Eliminate the global variables tickadj, tickdelta and timedelta and their various use and initializations. This removes the most significant obstacle to running timecounter and NTP housekeeping from a timeout rather than hardclock. Revision Changes Path 1.44 +74 -0 src/sys/kern/kern_ntptime.c 1.119 +4 -19 src/sys/kern/kern_tc.c 1.81 +0 -72 src/sys/kern/kern_time.c 1.54 +0 -2 src/sys/kern/subr_param.c 1.102 +0 -3 src/sys/sys/kernel.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204151223.g3FCNCB10848>