From owner-freebsd-amd64@FreeBSD.ORG Mon Sep 26 16:17:04 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 570C916A41F; Mon, 26 Sep 2005 16:17:04 +0000 (GMT) (envelope-from martin@gneto.com) Received: from mxfep01.bredband.com (mxfep01.bredband.com [195.54.107.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47B7C43D53; Mon, 26 Sep 2005 16:17:00 +0000 (GMT) (envelope-from martin@gneto.com) Received: from ua-83-227-181-30.cust.bredbandsbolaget.se ([83.227.181.30] [83.227.181.30]) by mxfep01.bredband.com with ESMTP id <20050926161656.CKBI24001.mxfep01.bredband.com@ua-83-227-181-30.cust.bredbandsbolaget.se>; Mon, 26 Sep 2005 18:16:56 +0200 Received: from [192.168.10.11] (euklides.gneto.com [192.168.10.11]) by ua-83-227-181-30.cust.bredbandsbolaget.se (Postfix) with ESMTP id 9059867832; Mon, 26 Sep 2005 18:16:56 +0200 (CEST) Message-ID: <43381EF8.2060308@gneto.com> Date: Mon, 26 Sep 2005 18:16:56 +0200 From: Martin Nilsson User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050924) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <200509201616.22475.jhb@FreeBSD.org> <433147C0.8030900@gneto.com> <200509211507.04755.jhb@FreeBSD.org> In-Reply-To: <200509211507.04755.jhb@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-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: Mon, 26 Sep 2005 16:17:04 -0000 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? /Martin