diff options
author | Andi Kleen <ak@linux.intel.com> | 2014-03-31 08:07:46 -0700 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2014-06-13 13:15:28 -0700 |
commit | 8491ed6d70b60e4c75cdcfde10ae759898547b08 (patch) | |
tree | f26bd7e65ec2a860474297d5c8b87d49193ca4f2 /sysdeps/unix/sysv/linux/x86 | |
parent | a832bdd36203fcb37fa5ad25200ef3c1ae205efe (diff) | |
download | glibc-8491ed6d70b60e4c75cdcfde10ae759898547b08.zip glibc-8491ed6d70b60e4c75cdcfde10ae759898547b08.tar.gz glibc-8491ed6d70b60e4c75cdcfde10ae759898547b08.tar.bz2 |
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 'sysdeps/unix/sysv/linux/x86')
-rw-r--r-- | sysdeps/unix/sysv/linux/x86/elision-conf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/x86/elision-conf.c b/sysdeps/unix/sysv/linux/x86/elision-conf.c index e6f5d6d..28e48d9 100644 --- a/sysdeps/unix/sysv/linux/x86/elision-conf.c +++ b/sysdeps/unix/sysv/linux/x86/elision-conf.c @@ -66,6 +66,8 @@ elision_init (int argc __attribute__ ((unused)), #ifdef ENABLE_LOCK_ELISION __pthread_force_elision = __libc_enable_secure ? 0 : __elision_available; #endif + if (!HAS_RTM) + __elision_aconf.retry_try_xbegin = 0; /* Disable elision on rwlocks */ } #ifdef SHARED |