From owner-freebsd-current@FreeBSD.ORG Thu May 6 10:19:01 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 4E06716A4CE for ; Thu, 6 May 2004 10:19:01 -0700 (PDT) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7423E43D48 for ; Thu, 6 May 2004 10:18:58 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])i46HIp5v022910; Fri, 7 May 2004 03:18:51 +1000 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i46HImHW016837; Fri, 7 May 2004 03:18:49 +1000 Date: Fri, 7 May 2004 03:18:47 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Bruce M Simpson In-Reply-To: <20040506150754.GC27139@empiric.dek.spc.org> Message-ID: <20040507031253.Y21938@gamplex.bde.org> References: <20040506150754.GC27139@empiric.dek.spc.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org cc: Gerrit Nagelhout cc: Andrew Gallatin Subject: Re: 4.7 vs 5.2.1 SMP/UP bridging performance 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: Thu, 06 May 2004 17:19:01 -0000 On Thu, 6 May 2004, Bruce M Simpson wrote: > On Thu, May 06, 2004 at 10:15:44AM -0400, Andrew Gallatin wrote: > > For what its worth, using those operations yeilds these results > > on my 2.53GHz P4 (for UP) > > > > Mutex (atomic_store_rel_int) cycles per iteration: 208 > > Mutex (sfence) cycles per iteration: 85 > > Mutex (lfence) cycles per iteration: 63 > > Mutex (mfence) cycles per iteration: 169 > > Mutex (none) cycles per iteration: 18 > > > > lfence looks like a winner.. > > Please be aware, though, that the different FENCE instructions are acting > as fences against different things. The NASM documentation has a good > quick reference for what each of the instructions do, but the definitive > reference is Intel's IA-32 programmer's reference manuals. They are also documented in amd64 manuals. Don't they all act as fences only on the same CPU, so they are no help for SMP? They are still almost twice as slow than full locks on Athlons, so hopefully they do more. Bruce