[PATCHv2 0/2] powerpc: Optimize lock elision for pthread_mutex_t:

Paul E. Murphy murphyp@linux.vnet.ibm.com
Thu Sep 3 15:55:00 GMT 2015


Decrementing the adapt_count before entering an elidable critical
section slows down pthread_mutex_lock().  Doing it after the
critical section removes most of this penalty.

In order to achieve this, a new parameter needs to be passed
to the lll_unlock_elision macro.  This will not alter the
behavior of the other architectures which choose not to use it.

Paul E. Murphy (2):
  nptl: Add adapt_count parameter to lll_unlock_elision
  powerpc: Optimize lock elision for pthread_mutex_t

 nptl/pthread_mutex_unlock.c                       |    4 ++--
 sysdeps/unix/sysv/linux/powerpc/elision-lock.c    |    1 -
 sysdeps/unix/sysv/linux/powerpc/elision-trylock.c |    1 -
 sysdeps/unix/sysv/linux/powerpc/elision-unlock.c  |   10 +++++++++-
 sysdeps/unix/sysv/linux/powerpc/lowlevellock.h    |    6 +++---
 sysdeps/unix/sysv/linux/s390/lowlevellock.h       |    2 +-
 sysdeps/unix/sysv/linux/x86_64/lowlevellock.h     |    2 +-
 7 files changed, 16 insertions(+), 10 deletions(-)



More information about the Libc-alpha mailing list