From owner-cvs-src@FreeBSD.ORG Sat Feb 5 23:16:27 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2D7216A4CE; Sat, 5 Feb 2005 23:16:27 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC62143D1D; Sat, 5 Feb 2005 23:16:27 +0000 (GMT) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j15NGRh1059574; Sat, 5 Feb 2005 23:16:27 GMT (envelope-from njl@repoman.freebsd.org) Received: (from njl@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j15NGRAi059573; Sat, 5 Feb 2005 23:16:27 GMT (envelope-from njl) Message-Id: <200502052316.j15NGRAi059573@repoman.freebsd.org> From: Nate Lawson Date: Sat, 5 Feb 2005 23:16:27 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/i386/i386 machdep.c src/sys/amd64/amd64 machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2005 23:16:28 -0000 njl 2005-02-05 23:16:27 UTC FreeBSD src repository Modified files: sys/i386/i386 machdep.c sys/amd64/amd64 machdep.c Log: Make cpu_est_clockrate() more accurate by disabling interrupts for the millisecond it is calibrating. Suggested by jhb@ and bde@. Don't clobber the tsc_freq with the new value since it isn't accurate enough for timecounters and the timecounter system as a whole needs support for changing rates before we do this. Subtract 0.5% from our measurement to account for overhead in DELAY. Note that this interface is for estimating the clockrate and needs to work well at runtime so doing a full calibration including disabling interrupts for a second is not feasible. Revision Changes Path 1.628 +10 -2 src/sys/amd64/amd64/machdep.c 1.606 +10 -2 src/sys/i386/i386/machdep.c