This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: TSX lock elision for glibc v10
- From: Rich Felker <dalias at aerifal dot cx>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: f at two dot firstfloor dot org, Torvald Riegel <triegel at redhat dot com>, libc-alpha at sourceware dot org
- Date: Thu, 13 Jun 2013 16:53:52 -0400
- Subject: Re: TSX lock elision for glibc v10
- References: <1370969416-8337-1-git-send-email-andi at firstfloor dot org> <1371140799 dot 16968 dot 19087 dot camel at triegel dot csb> <20130613193514 dot GE29800 at brightrain dot aerifal dot cx> <20130613200843 dot GM6123 at two dot firstfloor dot org>
On Thu, Jun 13, 2013 at 10:08:43PM +0200, Andi Kleen wrote:
> > 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
>
> The "danger" being the enforced deadlock not happening ?
Yes.
> Sorry this whole thing seems like a red herring to me. Even Torvalds
> agreed that it is more a bug in the POSIX standard, than anything else.
> Obviously it is.
You're welcome to argue this with the Austin Group, but the way the
standard is worded, it was clearly intentional at the time. But it
would have to be a change in the next version I think, not now, and
normally glibc aims to keep compatibility with outdated versions of
the standards over much stupider issues than this one.
> Only requiring opt-in would kill a lot of the benefits from
> putting this into glibc. Disabling any nesting would also kill a lot of the
> benefit.
Adding a separate constant for NORMAL type mutexes would fix the issue
completely and could be done right now without any controversy.
> We could ask the POSIX comittee for a clarification, but that would
> just prevent any chance of getting the feature in 2.18 and get
> some real testing.
2.18 is frozen anyway. I think there's plenty of time for 2.19.
Rich