From owner-cvs-all@FreeBSD.ORG Sun May 23 23:31:59 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EBF016A4CE; Sun, 23 May 2004 23:31:59 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8A2943D46; Sun, 23 May 2004 23:31:58 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i4O6VUXJ009718; Mon, 24 May 2004 08:31:35 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Bruce Evans From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 24 May 2004 16:26:28 +1000." <20040524155045.V23809@gamplex.bde.org> Date: Mon, 24 May 2004 08:31:30 +0200 Message-ID: <9717.1085380290@critter.freebsd.dk> cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Nate Lawson Subject: Re: cvs commit: src/sys/conf files.amd64 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2004 06:31:59 -0000 In message <20040524155045.V23809@gamplex.bde.org>, Bruce Evans writes: >> I agree and think it may be good to do something about this. Care to >> suggest a way to adjust or at least detect TSC rate changes? On my >> laptop, the switch from 1 Ghz to 733 Mhz is done via SMM and thus is not >> user-detectable except through profiling. However, on desktop systems, >> the switch is almost certainly never automatic. We can have the control >> system notify the timecounters when the rate changes. > >The TSC could be sample on every clock interrupt or on every timecounter >call. This should at least tell you if the average TSC rate for the >samping period was significantly different, and if there is any long-term >drift. If the TSC varies in frequency we should not use it for timecounting, trying to compensate for the changes will never be precise enough to avoid significant short term jitter. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.