[PATCH 4/4] S390: Optimize lock-elision by decrementing adapt_count at unlock.

Stefan Liebler stli@linux.vnet.ibm.com
Fri Jan 20 08:54:00 GMT 2017


On 01/19/2017 12:14 PM, Stefan Liebler wrote:
> On 01/18/2017 05:25 PM, Torvald Riegel wrote:
>> On Wed, 2017-01-18 at 13:28 +0100, Stefan Liebler wrote:
>>> On 01/17/2017 07:52 PM, Torvald Riegel wrote:
>>>> On Tue, 2017-01-17 at 16:28 +0100, Stefan Liebler wrote:
>>>> The rest of the diff looked OK.
>>>>
>>> If it's okay, I will make one patch with all the reviewed diffs and post
>>> it with a ChangeLog in this mail-thread.
>>> Then I would commit it before release to have a consistent state?
>>
>> Yes, please commit this.
>>
>>
>>
> Okay. I'll commit this patch.
> Thanks.
>
> S390: Adjust lock elision code after review.
>
> This patch adjusts s390 specific lock elision code after review
> of the following patches:
> -S390: Use own tbegin macro instead of __builtin_tbegin.
> (8bfc4a2ab4bebdf86c151665aae8a266e2f18fb4)
> -S390: Use new __libc_tbegin_retry macro in elision-lock.c.
> (53c5c3d5ac238901c13f28a73ba05b0678094e80)
> -S390: Optimize lock-elision by decrementing adapt_count at unlock.
> (dd037fb3df286b7c2d0b0c6f8d02a2dd8a8e8a08)
>
> The futex value is not tested before starting a transaction,
> __glibc_likely is used instead of __builtin_expect and comments
> are adjusted.
>
> ChangeLog:
>
>     * sysdeps/unix/sysv/linux/s390/htm.h: Adjust comments.
>     * sysdeps/unix/sysv/linux/s390/elision-unlock.c: Likewise.
>     * sysdeps/unix/sysv/linux/s390/elision-lock.c: Adjust comments.
>     (__lll_lock_elision): Do not test futex before starting a
>     transaction.  Use __glibc_likely instead of __builtin_expect.
>     * sysdeps/unix/sysv/linux/s390/elision-trylock.c: Adjust comments.
>     (__lll_trylock_elision): Do not test futex before starting a
>     transaction.  Use __glibc_likely instead of __builtin_expect.
Commited.



More information about the Libc-alpha mailing list