From owner-freebsd-amd64@FreeBSD.ORG Wed Sep 21 19:16:40 2005 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D08416A41F; Wed, 21 Sep 2005 19:16:40 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20C8943D75; Wed, 21 Sep 2005 19:16:37 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.41.233] (Not Verified[10.50.41.233]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Wed, 21 Sep 2005 15:32:18 -0400 From: John Baldwin To: freebsd-amd64@freebsd.org Date: Wed, 21 Sep 2005 15:07:03 -0400 User-Agent: KMail/1.8 References: <200509201616.22475.jhb@FreeBSD.org> <433147C0.8030900@gneto.com> In-Reply-To: <433147C0.8030900@gneto.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509211507.04755.jhb@FreeBSD.org> Cc: amd64@freebsd.org Subject: Re: Patch to use fence instructions X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2005 19:16:40 -0000 On Wednesday 21 September 2005 07:45 am, Martin Nilsson wrote: > John Baldwin wrote: > > This patch changes the atomic operations and bus space barriers to use > > the x86 fence instructions. Please test, thanks! > > > > http://www.FreeBSD.org/~jhb/patches/amd64_fences.patch > > What kind of performance improvements can we expect with this patch? > Is it worthwile to compare performance on dualcore Pentium D with > sysbench before and after this patch? Does it affect threads & mutex > performance? > > Sysbench is a benchmark specially made to determine lowlevel performance > important for MySQL and be found here: http://sysbench.sourceforge.net/ I'm not sure what improvements it would provide (I don't have any amd64 hardware to test on anyway). I believe that in some microbenchmarks bde@ found that just using lfence or sfence was only about half the cost of using the 'lock' prefix. Thus, things like atomic_store_rel (used in mutexes) might perform better. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org