From owner-freebsd-arch Mon Apr 1 4:29: 2 2002 Delivered-To: freebsd-arch@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 2125437B420 for ; Mon, 1 Apr 2002 04:28:57 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.2/8.12.2) with ESMTP id g31CSV4F004906; Mon, 1 Apr 2002 14:28:32 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Dag-Erling Smorgrav Cc: arch@FreeBSD.ORG Subject: Re: mutex profiling In-Reply-To: Your message of "01 Apr 2002 13:38:01 +0200." Date: Mon, 01 Apr 2002 14:28:31 +0200 Message-ID: <4905.1017664111@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message , Dag-Erling Smorgrav writes: >Poul-Henning Kamp writes: >> With the footnote that the TSC's are not synchronized on SMP >> systems [...] > >We tried using {,get}nanouptime() instead, but got nothing but >zeroes... nanouptime() should not get you zeros, but it would be slower than TSC. getnanouptime would hopefully give you all zeros. I didn't mean to imply that the TSC was wrong as such, but merely wanted to point to the fact that a mutex locked on one CPU and unlocked on another will (likely) screw up your numbers big time. -- 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message