glibc/sysdeps/unix/sysv/linux/s390
Stefan Liebler dd037fb3df 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.
2016-12-20 15:12:48 +01:00
..
bits Consolidate Linux setrlimit and getrlimit implementation 2016-11-17 15:54:22 -02:00
fpu
s390-32 Add fmaxmag, fminmag functions. 2016-12-20 00:46:53 +00:00
s390-64 Add fmaxmag, fminmag functions. 2016-12-20 00:46:53 +00:00
sys Minor correction to the "installed header hygiene" patches. 2016-09-28 07:19:59 -04:00
Implies
Makefile S390: Use own tbegin macro instead of __builtin_tbegin. 2016-12-20 15:12:48 +01:00
Versions
arch-fork.h
brk.c
configure
configure.ac
dl-cache.h
dl-procinfo.h
elision-conf.c
elision-conf.h
elision-lock.c S390: Optimize lock-elision by decrementing adapt_count at unlock. 2016-12-20 15:12:48 +01:00
elision-timed.c
elision-trylock.c S390: Optimize lock-elision by decrementing adapt_count at unlock. 2016-12-20 15:12:48 +01:00
elision-unlock.c S390: Optimize lock-elision by decrementing adapt_count at unlock. 2016-12-20 15:12:48 +01:00
force-elision.h
htm.h S390: Use new __libc_tbegin_retry macro in elision-lock.c. 2016-12-20 15:12:48 +01:00
init-first.c
jmp-unwind.c
kernel-features.h
ldconfig.h
ldd-rewrite.sed
libanl.abilist
libc-vdso.h
localplt.data ld.so: Remove __libc_memalign 2016-11-30 16:23:58 +01:00
longjmp_chk.c
lowlevellock.h S390: Optimize lock-elision by decrementing adapt_count at unlock. 2016-12-20 15:12:48 +01:00
nldbl-abi.h
opensock.c
pt-longjmp.c Use libc_ifunc macro for siglongjmp, longjmp in libpthread. 2016-10-07 10:12:48 +02:00
pt-vfork.S
pthread_mutex_cond_lock.c
pthread_mutex_lock.c
pthread_mutex_timedlock.c
pthread_mutex_trylock.c
readelflib.c
rt-sysdep.S
sa_len.c
semtimedop.c
sigcontextinfo.h
sysconf.c
system.c
ucontext_i.sym