This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TSX lock elision for glibc v10


On Thu, Jun 13, 2013 at 06:26:39PM +0200, Torvald Riegel wrote:
> On Tue, 2013-06-11 at 09:50 -0700, Andi Kleen wrote:
> > Some bug fixes compared to the last version. Should be ready 
> > for merging.
> 
> I disagree that this is ready for merging.
> 
> 
> 1) It breaks the semantics of PTHREAD_MUTEX_NORMAL because it doesn't
> guarantee to block when trying to lock an already acquired mutex.  Rich
> Felker has brought up convincing arguments why this can be use in
> correct programs.  See http://sourceware.org/glibc/wiki/LockElisionGuide
> and the comment in patch 3.

It seems the intent of this patch is to work around the issue by never
using elision unless it's explicitly requested. However, if I'm not
mistaken, there's an environment variable to request elision by
default, and this would DANGEROUSLY break applications using
PTHREAD_MUTEX_NORMAL. Thus, I think this is an issue that needs to be
resolved before merge, or else the env var to request elision needs to
be removed.

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]