From owner-freebsd-current@FreeBSD.ORG Sun Aug 15 09:03:44 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 526F016A4CE for ; Sun, 15 Aug 2004 09:03:44 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 191A143D1F for ; Sun, 15 Aug 2004 09:03:44 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 21622530C; Sun, 15 Aug 2004 11:03:43 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 6730E5308; Sun, 15 Aug 2004 11:03:36 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id E2527B872; Sun, 15 Aug 2004 11:03:35 +0200 (CEST) To: Doug White References: <16668.61707.474283.639200@grasshopper.cs.duke.edu> <20040813103710.F93695@carver.gumbysoft.com> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Sun, 15 Aug 2004 11:03:35 +0200 In-Reply-To: <20040813103710.F93695@carver.gumbysoft.com> (Doug White's message of "Fri, 13 Aug 2004 10:38:29 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: freebsd-current@freebsd.org cc: Andrew Gallatin Subject: Re: Is the TSC timecounter safe on SMP system? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2004 09:03:44 -0000 Doug White writes: > On Fri, 13 Aug 2004, Andrew Gallatin wrote: > > I have a system where the TSC timecounter is quite a bit more accurate > > (or perhaps its just much cheaper) than the ACPI timecounter. This is a > > single CPU, HTT system running an SMP kernel. > > [...] > > 1) Is it safe to switch to TSC? > If you like your ticks bouncing around; you'll get different values > depending on which CPU you read. Not necessarily; some SMP motherboards keep the TSCs synchronized. On those systems, you can set the kern.timecounter.smp_tsc tunable to a non-zero value to make the TSC eligible. It defaults to 1 on single- CPU systems, but the TSC code can't tell the difference between an HTT-enabled single-CPU box and a dual-CPU box, so you have to force it on HTT-enabled systems. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no