about summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2014-03-31 08:07:46 -0700
committerAndi Kleen <ak@linux.intel.com>2014-06-13 13:15:28 -0700
commit8491ed6d70b60e4c75cdcfde10ae759898547b08 (patch)
treef26bd7e65ec2a860474297d5c8b87d49193ca4f2 /ChangeLog
parenta832bdd36203fcb37fa5ad25200ef3c1ae205efe (diff)
downloadglibc-8491ed6d70b60e4c75cdcfde10ae759898547b08.tar.gz
glibc-8491ed6d70b60e4c75cdcfde10ae759898547b08.tar.xz
glibc-8491ed6d70b60e4c75cdcfde10ae759898547b08.zip
Add adaptive elision to rwlocks
This patch relies on the C version of the rwlocks posted earlier.
With C rwlocks it is very straight forward to do adaptive elision
using TSX. It is based on the infrastructure added earlier
for mutexes, but uses its own elision macros. The macros
are fairly general purpose and could be used for other
elision purposes too.

This version is much cleaner than the earlier assembler based
version, and in particular implements adaptation which makes
it safer.

I changed the behavior slightly to not require any changes
in the test suite and fully conform to all expected
behaviors (generally at the cost of not eliding in
various situations). In particular this means the timedlock
variants are not elided.  Nested trylock aborts.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog48
1 files changed, 48 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c2de6f8a05..6e3d2a9a72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,53 @@
 2014-06-13  Andi Kleen  <ak@linux.intel.com>
 
+	* nptl/pthread_rwlock_rdlock.c: Include elide.h.
+        (pthread_rwlock_rdlock): Add elision.
+        * nptl/pthread_rwlock_wrlock.c: Include elide.h.
+        (pthread_rwlock_wrlock): Add elision.
+        * nptl/pthread_rwlock_trywrlock.c: Include elide.h.
+        (pthread_rwlock_trywrlock): Add elision.
+        * nptl/pthread_rwlock_tryrdlock.c: Include elide.h.
+        (pthread_rwlock_tryrdlock): Add elision.
+        * nptl/pthread_rwlock_unlock.c: Include elide.h.
+        (pthread_rwlock_tryrdlock): Add elision unlock.
+        * nptl/sysdeps/pthread/pthread.h:
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Handle new define
+        (PTHREAD_RWLOCK_INITIALIZER,
+        PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP):
+        Handle new elision field.
+        * sysdeps/x86/nptl/elide.h: New file. Add generic elision macros.
+        * sysdeps/arm/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/sh/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/tile/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/a/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/aarch64/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/microblaze/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/powerpc/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/x86/elision-conf.c:
+        (elision_init): Set try_xbegin to zero when no RTM.
+        * sysdeps/x86/nptl/bits/pthreadtypes.h
+        (pthread_rwlock_t): Change __pad1 to __rwelision.
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+
+2014-06-13  Andi Kleen  <ak@linux.intel.com>
+
 	* nptl/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
 	Split into __do_pthread_rwlock_rdlock and __pthread_rwlock_rdlock.
 	* nptl/pthread_rwlock_wrlock (__pthread_rwlock_wrlock):