This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][PATCH] tunables: Add elision tunable
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: Stefan Liebler <stli at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org, Rogerio Alves Cardoso <rcardoso at linux dot vnet dot ibm dot com>
- Cc:
- Date: Tue, 05 Dec 2017 17:52:00 -0200
- Subject: Re: [RFC][PATCH] tunables: Add elision tunable
- Authentication-results: sourceware.org; auth=none
- References: <68de6583-4f5c-5fa4-9328-1682e614ef56@linux.vnet.ibm.com> <581813ef-53f8-ba33-4026-21e8970d0155@linux.vnet.ibm.com> <d0be5934-6926-35b7-ff30-8e975464e571@redhat.com> <82fe9665-1329-98c1-7a15-c1b953bda91d@linux.vnet.ibm.com> <605c6017-4e5d-553a-d1ff-36b6480e7313@linux.vnet.ibm.com>
Stefan Liebler <stli@linux.vnet.ibm.com> writes:
> On 11/16/2017 07:44 PM, Rogerio Alves wrote:
>> All documentation suggestions was made on patch v5. Thanks for the review.
>>
>> Regards
>>
>> Rogerio.
>>
>
> I've applied your patch in order to test it on s390.
> Unfortunately building glibc is now failing.
>
> Here are some notes:
>
> git apply warned:
> 0001-Add-elision-tunables.patch:291: trailing whitespace.
> # Disable elision for tst-mutex8 so it can verify error case for
> warning: 1 line adds whitespace errors.
>
> Changing configure.ac is not sufficient.
> Please regenerate configure in order to reflect the changes in configure.ac.
>
> There are also usages of enable_lock_elision and ENABLE_LOCK_ELISION in
> config.make.in, sysdeps/unix/sysv/linux/s390/Makefile,
> sysdeps/s390/nptl/bits/pthreadtypes-arch.h, sysdeps/s390/configure.ac.
>
> Please have a look into attached diff which applies on top of your patch
> v5. With those changes I was able to build glibc on s390.
>
> Afterwards I've run a small test program which determines if
> pthread_mutex_lock is using a transaction or not:
>
> ./prog
> Lock was a normal lock!
>
> GLIBC_TUNABLES=glibc.elision.enable=1 ./prog
> Lock was elided via a transaction! (nesting-depth=1)
>
> GLIBC_TUNABLES=glibc.elision.enable=0 ./prog
> Lock was a normal lock!
>
> chmod +s prog_secure
> GLIBC_TUNABLES=glibc.elision.enable=1 ./prog_secure
> Lock was a normal lock!
I applied this patch, updated the ChangeLog, run tests on ppc{|64|64le},
s390x and x86_64, and pushed the patch as 07ed18d26a342.
Thanks!
--
Tulio Magno