glibc/sysdeps/unix/sysv/linux/powerpc
Paul Murphy 9695cb3e65 powerpc: Spinlock optimization and cleanup
This patch optimizes powerpc spinlock implementation by:

* Use the correct EH hint bit on the larx for supported ISA.  For lock
  acquisition, the thread that acquired the lock with a successful stcx
  does not want to give away the write ownership on the cacheline.  The
  idea is to make the load reservation "sticky" about retaining write
  authority to the line.  That way, the store that must inevitably come
  to release the lock can succeed quickly and not contend with other
  threads issuing lwarx.  If another thread does a store to the line
  (false sharing), the winning thread must give up write authority to
  the proper value of EH for the larx for a lock acquisition is 1.

* Increase contented lock performance by up to 40%, and no measurable
  impact on uncontended locks on P8.

Thanks to Adhemerval Zanella who did most of the work.  I've run some
tests, and addressed some minor feedback.

	* sysdeps/powerpc/nptl/pthread_spin_lock.c (pthread_spin_lock):
	Add lwarx hint, and use macro for acquire instruction.
	* sysdeps/powerpc/nptl/pthread_spin_trylock.c (pthread_spin_trylock):
	Likewise.
	* sysdep/unix/sysv/linux/powerpc/pthread_spin_unlock.c: Move to ...
	* sysdeps/powerpc/nptl/pthread_spin_unlock.c: ... here, and
	update to use new atomic macros.
2015-11-19 18:04:30 -02:00
..
bits libc-vdso.h place consolidation 2015-04-20 08:51:17 -03:00
powerpc32 Remove __signbit* from localplt.data as they are no longer called from within GLIBC. 2015-11-10 11:15:43 +00:00
powerpc64 Simplify the abilist format 2015-11-06 13:58:53 +01:00
sys
Implies
Makefile powerpc __tls_get_addr call optimization 2015-03-25 15:53:47 +10:30
Versions Add version set GLIBC_2.19 for linux/powerpc 2015-08-17 16:21:51 +02:00
arch-fork.h
configure
configure.ac
dl-brk.S
dl-cache.h
dl-static.c
dl-sysdep.c
elision-conf.c
elision-conf.h
elision-lock.c powerpc: Fix usage of elision transient failure adapt param 2015-10-27 17:27:41 -02:00
elision-timed.c
elision-trylock.c powerpc: More elision improvements 2015-11-19 16:15:42 -02:00
elision-unlock.c powerpc: Optimize lock elision for pthread_mutex_t 2015-10-15 18:56:10 -03:00
force-elision.h
get_clockfreq.c Use inline syscalls for non-cancellable versions 2015-06-04 14:52:34 -03:00
get_timebase_freq.c
getdents64.c
getmsg.c
getrlimit64.c
gettimeofday.c libc-vdso.h place consolidation 2015-04-20 08:51:17 -03:00
htm.h powerpc: More elision improvements 2015-11-19 16:15:42 -02:00
init-first.c Consolidate gettimeofday across aarch64/s390/tile 2015-05-26 17:03:35 -03:00
ioctl.c
ipc_priv.h
kernel-features.h Call direct system calls for socket operations 2015-08-25 13:45:56 -03:00
kernel_termios.h
ldconfig.h
ldd-rewrite.sed
ldsodefs.h
libc-start.c
libc-vdso.h Consolidate vDSO macros and usage 2015-05-26 10:10:36 -03:00
lowlevellock.h powerpc: Optimize lock elision for pthread_mutex_t 2015-10-15 18:56:10 -03:00
nldbl-abi.h
oldgetrlimit64.c
profil-counter.h
pt-longjmp.c
pthread_attr_setstack.c
pthread_attr_setstacksize.c
pthread_mutex_cond_lock.c
pthread_mutex_lock.c
pthread_mutex_timedlock.c
pthread_mutex_trylock.c
putmsg.c
readdir64.c
readdir64_r.c
readelflib.c
rt-sysdep.c
sigcontextinfo.h
syscall.S powerpc: Fix tabort usage in syscalls 2015-08-25 13:45:56 -03:00
syscalls.list
sysdep.c
test-gettimebasefreq.c
time.c libc-vdso.h place consolidation 2015-04-20 08:51:17 -03:00