From owner-freebsd-amd64@FreeBSD.ORG Mon Sep 26 18:57:41 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 0326016A41F for ; Mon, 26 Sep 2005 18:57:41 +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 769C043D5A for ; Mon, 26 Sep 2005 18:57:40 +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 ; Mon, 26 Sep 2005 15:13:36 -0400 From: John Baldwin To: freebsd-amd64@freebsd.org Date: Mon, 26 Sep 2005 14:02:59 -0400 User-Agent: KMail/1.8 References: <200509201616.22475.jhb@FreeBSD.org> <200509211507.04755.jhb@FreeBSD.org> <43381EF8.2060308@gneto.com> In-Reply-To: <43381EF8.2060308@gneto.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509261403.00274.jhb@FreeBSD.org> Cc: 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: Mon, 26 Sep 2005 18:57:41 -0000 On Monday 26 September 2005 12:16 pm, Martin Nilsson wrote: > John Baldwin wrote: > > 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. > > I have tested the patch but I'm not able to see any difference with the > mutex & threads tests in sysbench. On the other hand I'm not seeing any > regressions either and everything seems to work OK. Can you suggest a > better low-level test? Robert Watson (rwatson@) has a kernel module (or maybe a hack) for benchmarking our in-kernel primitives. Running that might be a good micro-benchmark. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org