Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Sep 2005 14:02:59 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-amd64@freebsd.org
Subject:   Re: Patch to use fence instructions
Message-ID:  <200509261403.00274.jhb@FreeBSD.org>
In-Reply-To: <43381EF8.2060308@gneto.com>
References:  <200509201616.22475.jhb@FreeBSD.org> <200509211507.04755.jhb@FreeBSD.org> <43381EF8.2060308@gneto.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509261403.00274.jhb>