From owner-cvs-all Mon Apr 15 5:23:16 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0056237B416; Mon, 15 Apr 2002 05:23:13 -0700 (PDT) Received: (from phk@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3FCNCB10848; Mon, 15 Apr 2002 05:23:12 -0700 (PDT) (envelope-from phk) Message-Id: <200204151223.g3FCNCB10848@freefall.freebsd.org> From: Poul-Henning Kamp Date: Mon, 15 Apr 2002 05:23:12 -0700 (PDT) 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 X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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