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: Torvald Riegel <triegel at redhat dot com>
- To: Rich Felker <dalias at aerifal dot cx>
- 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 21:33:42 +0200
- 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> <20130621160924 dot GN6123 at two dot firstfloor dot org> <1371833629 dot 964 dot 5253 dot camel at triegel dot csb> <20130621172701 dot GO6123 at two dot firstfloor dot org> <20130621173931 dot GE29800 at brightrain dot aerifal dot cx>
On Fri, 2013-06-21 at 13:39 -0400, Rich Felker wrote:
> On Fri, Jun 21, 2013 at 07:27:01PM +0200, Andi Kleen wrote:
> > > I don't want to change or expose anything externally if I don't have to.
> > > This will make it easier for us to just enable elision without risking
> > > to have to maintain other interfaces, break ABIs, etc.
> >
> > I don't see the point of checking a new number on all the fast paths
> > when it doesn't do anything different.
> >
> > With elision it's just the same as TIMED_NP | NO_ELISION
> >
> > So why not use that internally?
>
> I agree. For now, pthread_mutexattr_settype can just set the "no
> elision" flag whenever it's called. I don't see a need for a new mutex
> type unless it would enable doing something that's actually useful.
It's there to enable elision without breaking the ABI. Also,
conceptually, this is really independent of elision or not. And we
don't have consensus for the flags actually.