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: [PATCH 03/11] Add external interface changes: new lock types for pthread_mutex_t


On Thu, 2013-06-13 at 23:15 +0200, Andi Kleen wrote:
> > Please give PTHREAD_MUTEX_DEFAULT a new enum value, leaving
> > PTHREAD_MUTEX_NORMAL unchanged.  Next, don't use elision for
> > PTHREAD_MUTEX_NORMAL.
> 
> This would mean no elision for existing binaries.

Yes, I'm aware of this.  And that's an unfortunate situation to be in,
but I don't see another way to ensure that we still comply with the
POSIX requirements -- we can't just ignore those.  Since we had the
discussion about the semantics months ago, I haven't seen someone else
suggest a different way to solve this.

> I'm completely opposed to this. This would kill the major benefit
> for even doing all of this in glibc.

If you mean "the major benefit" in the sense of the only major benefit,
then I disagree.  It would be good to have it for existing binaries, but
once they get recompiled, they will be able to benefit from lock
elision.

I think you should also consider the risk of deviating from the POSIX
semantics: If, for example, distributions do not enable elision because
they are worried about breaking existing programs, then this will lead
to elision being less widely used than if it weren't available just for
binaries that haven't been recompiled.


Torvald


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