This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: TSX lock elision for glibc v12
- From: Rich Felker <dalias at aerifal dot cx>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: Andi Kleen <andi at firstfloor dot org>, libc-alpha at sourceware dot org, Carlos O'Donell <carlos at redhat dot com>, Roland McGrath <roland at hack dot frob dot com>
- Date: Fri, 21 Jun 2013 11:37:07 -0400
- Subject: Re: TSX lock elision for glibc v12
- References: <1371592286-22073-1-git-send-email-andi at firstfloor dot org> <1371753271 dot 964 dot 2220 dot camel at triegel dot csb> <20130621012328 dot GA29800 at brightrain dot aerifal dot cx> <1371811686 dot 964 dot 4100 dot camel at triegel dot csb> <1371823366 dot 964 dot 4706 dot camel at triegel dot csb> <1371824261 dot 964 dot 4757 dot camel at triegel dot csb> <1371826829 dot 964 dot 4905 dot camel at triegel dot csb>
On Fri, Jun 21, 2013 at 05:00:29PM +0200, Torvald Riegel wrote:
> Or should we just not try to support explicit initialization of DEFAULT
> mutexes *via settype()* and just make them NORMAL mutexes by default?
> This way, we wouldn't need to introduce a new public
> PTHREAD_MUTEX_DEFAULT value, and could still disambiguate DEFAULT from
> NORMAL when the initialization happens via static initializers or
> default mutex attributes (ie, NULL parameter).
I'm fine with this. I don't think there's any sane reason to call
pthread_mutexattr_settype when making default-type mutexes, and I
doubt any real-world apps do it. If they do, it's their fault for
being slow; they're performing unnecessary, bloated operations in any
case and should be fixed.
Rich