Bug 19174 - PowerPC: TLE enabled pthread mutex performs poorly.
Summary: PowerPC: TLE enabled pthread mutex performs poorly.
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: nptl (show other bugs)
Version: 2.21
: P2 minor
Target Milestone: 2.23
Assignee: Paul E. Murphy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-26 17:28 UTC by Paul E. Murphy
Modified: 2016-02-16 19:13 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul E. Murphy 2015-10-26 17:28:55 UTC
When locking a critical section on multiple threads which contains no data dependencies, any non-persistent abort will cause a fallback to locking causing
unnecessary serialization.
Comment 1 Sourceware Commits 2015-10-27 19:30:38 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  72f1463df85a522bfd1568e47bd81371522ee358 (commit)
       via  76c5ae00284d98f1994434c570bdcde9dbc6b49e (commit)
      from  8b126a4a2ca78a5d98cc7afa219d93c8a31ed944 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=72f1463df85a522bfd1568e47bd81371522ee358

commit 72f1463df85a522bfd1568e47bd81371522ee358
Author: Paul Murphy <murphyp@linux.vnet.ibm.com>
Date:   Thu Aug 27 09:48:04 2015 -0500

    powerpc: Fix usage of elision transient failure adapt param
    
    The skip_lock_out_of_tbegin_retries adaptive parameter was
    not being used correctly, nor as described.  This prevents
    a fallback for all users of the lock if a transient abort
    occurs within the accepted number of retries.
    
    	[BZ #19174]
    	* sysdeps/powerpc/nptl/elide.h (__elide_lock): Fix usage of
    	.skip_lock_out_of_tbegin_retries.
    	* sysdeps/unix/sysv/linux/powerpc/elision-lock.c
    	(__lll_lock_elision): Likewise, and respect a value of
    	try_tbegin <= 0.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=76c5ae00284d98f1994434c570bdcde9dbc6b49e

commit 76c5ae00284d98f1994434c570bdcde9dbc6b49e
Author: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Date:   Fri Oct 9 16:01:35 2015 -0300

    Add AT_PLATFORM to _dl_aux_init ()
    
    Added AT_PLATFORM to _dl_aux_init () function to keep it in sync with
    _dl_sysdep_start ().
    
    	* elf/dl-support.c (_dl_aux_init): Added AT_PLATFORM to the case
    	statement.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                      |   14 ++++++++++++++
 NEWS                                           |    2 +-
 elf/dl-support.c                               |    3 +++
 sysdeps/powerpc/nptl/elide.h                   |    6 +++---
 sysdeps/unix/sysv/linux/powerpc/elision-lock.c |   15 ++++++---------
 5 files changed, 27 insertions(+), 13 deletions(-)
Comment 2 jsm-csl@polyomino.org.uk 2015-10-27 22:03:35 UTC
Since you added the bug number to NEWS, I presume this commit was intended 
as a complete fix for the bug, in which case you should close it as FIXED 
with the appropriate milestone set.
Comment 3 Paul E. Murphy 2015-10-28 14:17:01 UTC
This is now fixed.
Comment 4 Sourceware Commits 2015-12-17 17:19:31 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.22/master has been updated
       via  cd51b1424477652cccdb83e7a95644d198fd4513 (commit)
      from  13ff0739fdca293adab02b9f4fe78395de251086 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cd51b1424477652cccdb83e7a95644d198fd4513

commit cd51b1424477652cccdb83e7a95644d198fd4513
Author: Paul Murphy <murphyp@linux.vnet.ibm.com>
Date:   Thu Aug 27 09:48:04 2015 -0500

    powerpc: Fix usage of elision transient failure adapt param
    
    The skip_lock_out_of_tbegin_retries adaptive parameter was
    not being used correctly, nor as described.  This prevents
    a fallback for all users of the lock if a transient abort
    occurs within the accepted number of retries.
    
    	[BZ #19174]
    	* sysdeps/powerpc/nptl/elide.h (__elide_lock): Fix usage of
    	.skip_lock_out_of_tbegin_retries.
    	* sysdeps/unix/sysv/linux/powerpc/elision-lock.c
    	(__lll_lock_elision): Likewise, and respect a value of
    	try_tbegin <= 0.
    
    (cherry picked from commit 72f1463df85a522bfd1568e47bd81371522ee358)
    
    Conflicts:
    	NEWS

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                      |    9 +++++++++
 NEWS                                           |    2 +-
 sysdeps/powerpc/nptl/elide.h                   |    6 +++---
 sysdeps/unix/sysv/linux/powerpc/elision-lock.c |   15 ++++++---------
 4 files changed, 19 insertions(+), 13 deletions(-)
Comment 5 Sourceware Commits 2016-02-16 19:13:44 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, gentoo/2.22 has been updated
       via  23f12d0a815e55ab60a0e6d973fc3f4730ca6980 (commit)
      from  b84ee767b4303b77a5a284b2d03f56c98d89263c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=23f12d0a815e55ab60a0e6d973fc3f4730ca6980

commit 23f12d0a815e55ab60a0e6d973fc3f4730ca6980
Author: Paul Murphy <murphyp@linux.vnet.ibm.com>
Date:   Thu Aug 27 09:48:04 2015 -0500

    powerpc: Fix usage of elision transient failure adapt param
    
    The skip_lock_out_of_tbegin_retries adaptive parameter was
    not being used correctly, nor as described.  This prevents
    a fallback for all users of the lock if a transient abort
    occurs within the accepted number of retries.
    
    	[BZ #19174]
    	* sysdeps/powerpc/nptl/elide.h (__elide_lock): Fix usage of
    	.skip_lock_out_of_tbegin_retries.
    	* sysdeps/unix/sysv/linux/powerpc/elision-lock.c
    	(__lll_lock_elision): Likewise, and respect a value of
    	try_tbegin <= 0.
    
    (cherry picked from commit 72f1463df85a522bfd1568e47bd81371522ee358)
    
    Conflicts:
    	NEWS
    
    (cherry picked from commit cd51b1424477652cccdb83e7a95644d198fd4513)

-----------------------------------------------------------------------

Summary of changes:
 sysdeps/powerpc/nptl/elide.h                   |    6 +++---
 sysdeps/unix/sysv/linux/powerpc/elision-lock.c |   15 ++++++---------
 2 files changed, 9 insertions(+), 12 deletions(-)