diff options
author | Stefan Liebler <stli@linux.vnet.ibm.com> | 2016-12-20 15:12:48 +0100 |
---|---|---|
committer | Stefan Liebler <stli@linux.vnet.ibm.com> | 2016-12-20 15:12:48 +0100 |
commit | dd037fb3df286b7c2d0b0c6f8d02a2dd8a8e8a08 (patch) | |
tree | 6a2cf84e658ddd3271b2a93c61c83aac4070e1d0 /iconvdata/testdata/UTF-7..UTF8 | |
parent | 53c5c3d5ac238901c13f28a73ba05b0678094e80 (diff) | |
download | glibc-dd037fb3df286b7c2d0b0c6f8d02a2dd8a8e8a08.tar.gz glibc-dd037fb3df286b7c2d0b0c6f8d02a2dd8a8e8a08.tar.xz glibc-dd037fb3df286b7c2d0b0c6f8d02a2dd8a8e8a08.zip |
S390: Optimize lock-elision by decrementing adapt_count at unlock.
This patch decrements the adapt_count while unlocking the futex instead of before aquiring the futex as it is done on power, too. Furthermore a transaction is only started if the futex is currently free. This check is done after starting the transaction, too. If the futex is not free and the transaction nesting depth is one, we can simply end the started transaction instead of aborting it. The implementation of this check was faulty as it always ended the started transaction. By using the fallback path, the the outermost transaction was aborted. Now the outermost transaction is aborted directly. This patch also adds some commentary and aligns the code in elision-trylock.c to the code in elision-lock.c as possible. ChangeLog: * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock_elision, lll_unlock_elision): Add adapt_count argument. * sysdeps/unix/sysv/linux/s390/elision-lock.c: (__lll_lock_elision): Decrement adapt_count while unlocking instead of before locking. * sysdeps/unix/sysv/linux/s390/elision-trylock.c (__lll_trylock_elision): Likewise. * sysdeps/unix/sysv/linux/s390/elision-unlock.c: (__lll_unlock_elision): Likewise.
Diffstat (limited to 'iconvdata/testdata/UTF-7..UTF8')
0 files changed, 0 insertions, 0 deletions