This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Disable all lock elision unless --enable-lock-elision=yes
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Siddhesh Poyarekar <siddhesh at redhat dot com>
- Date: Mon, 29 Sep 2014 10:05:47 -0400
- Subject: Re: Disable all lock elision unless --enable-lock-elision=yes
- Authentication-results: sourceware.org; auth=none
- References: <54263FBC dot 5050200 at redhat dot com> <20140927181001 dot GJ2905 at two dot firstfloor dot org>
On 09/27/2014 02:10 PM, Andi Kleen wrote:
> Hi Carlos,
>
> On Sat, Sep 27, 2014 at 12:40:28AM -0400, Carlos O'Donell wrote:
>> Andi.
>>
>> The rwlock elision support you added in 2014-06-13
>> appears to unconditionally enable elision for rwlock's
>> if the RTM-bit indicates TSX is present. That isn't what
>> we do for mutexes, and isn't very conservative in that
>> case.
>>
>> Did I read the code right?
>
> You're right. It should have been disabled in this case.
>
> Patch looks good to me.
Andi,
Thanks. I'll get that checked in shortly. I just wanted to make
sure that we weren't doing it for any other reason.
I'll adjust the wording of the configure switch to indicate it
is for all elision usage in the library.
Cheers,
Carlos.