This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/3] Remove x86 assembler rwlock code
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: Andi Kleen <andi at firstfloor dot org>, libc-alpha at sourceware dot org, Andi Kleen <ak at odo dot jf dot intel dot com>
- Date: Mon, 9 Jun 2014 22:41:15 +0200
- Subject: Re: [PATCH 2/3] Remove x86 assembler rwlock code
- Authentication-results: sourceware.org; auth=none
- References: <1399412209-28245-1-git-send-email-andi at firstfloor dot org> <1399412209-28245-3-git-send-email-andi at firstfloor dot org> <539607DB dot 1080002 at redhat dot com>
On Mon, Jun 09, 2014 at 03:15:39PM -0400, Carlos O'Donell wrote:
> On 05/06/2014 05:36 PM, Andi Kleen wrote:
> > From: Andi Kleen <ak@odo.jf.intel.com>
> >
> > With the recent tuning the C version of rwlocks is basically the same
> > performance as the x86 assembler version for uncontended locks (with a
> > a few cycles near the run-to-run variability). For others it should not
> > matter anyways.
> >
> > So remove the assembler code and use the C version like other
> > architectures.
>
> Is there an objective microbenchmark we can add to the benchmark suite
> that shows the assembly and C are roughly equivalent?
>
Yes, read thread, either my or siddhesh's benchmark which measure
equivalent ways.
I am after Torvald's comment relatively sure that it measures correct
thing and it does not show difference. Only case that could affect it
would be when there are many threads with simultaneous readers but it is
out of scope.