From owner-freebsd-current Fri Aug 23 14:55: 5 2002 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 3D7AC37B400 for ; Fri, 23 Aug 2002 14:55:03 -0700 (PDT) Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7628043E65 for ; Fri, 23 Aug 2002 14:55:02 -0700 (PDT) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.3/8.11.3) with ESMTP id g7NLsxf24891; Fri, 23 Aug 2002 14:54:59 -0700 (PDT) (envelope-from jdp@vashon.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.12.4/8.12.4/Submit) id g7NLsxsi088258; Fri, 23 Aug 2002 14:54:59 -0700 (PDT) (envelope-from jdp) Date: Fri, 23 Aug 2002 14:54:59 -0700 (PDT) Message-Id: <200208232154.g7NLsxsi088258@vashon.polstra.com> To: current@freebsd.org From: John Polstra Cc: phk@critter.freebsd.dk Subject: Re: how to compute the skew between TSC in SMP systems ? In-Reply-To: <30560.1030138677@critter.freebsd.dk> References: <30560.1030138677@critter.freebsd.dk> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article <30560.1030138677@critter.freebsd.dk>, Poul-Henning Kamp wrote: > In message <200208232135.g7NLZZqx088123@vashon.polstra.com>, John Polstra write > s: > > Still, the feature has come in handy when debugging certain > >multiprocessor situations where I really needed to know the relative > >ordering of events taking place on both CPUs. > > Right, you might get away with that in tightly controlled circumstances, > but it would probably be far smarter to use the counter in the > IOAPIC (exists on all SMP) You mean the timer in the local APIC, don't you? I don't recall that the IOAPIC has one, and if it did it would probably be somewhat expensive to read it. > or the ACPI counter even in such cases. The trouble with both of those counters is that they don't give you the 1-CPU-cycle resolution that you get with the TSC. For some kinds of performance evaluation you really want to be able to count CPU cycles. John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message