This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 09/14] Add a new pthread_mutexattr_setelision_np interface.
- From: Torvald Riegel <triegel at redhat dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: "Carlos O'Donell" <carlos at redhat dot com>, libc-alpha at sourceware dot org, Andi Kleen <ak at linux dot jf dot intel dot com>, Roland McGrath <roland at hack dot frob dot com>
- Date: Tue, 02 Jul 2013 17:05:09 +0200
- Subject: Re: [PATCH 09/14] Add a new pthread_mutexattr_setelision_np interface.
- References: <1372452807-25216-1-git-send-email-andi at firstfloor dot org> <1372452807-25216-10-git-send-email-andi at firstfloor dot org> <51D09CA6 dot 7060700 at redhat dot com> <20130630215353 dot GL6123 at two dot firstfloor dot org> <1372763077 dot 22198 dot 4385 dot camel at triegel dot csb> <20130702144420 dot GX6123 at two dot firstfloor dot org>
On Tue, 2013-07-02 at 16:44 +0200, Andi Kleen wrote:
> > There is a way to turn it off per lock: You just set the type explicitly
> > to PTHREAD_MUTEX_NORMAL via settype().
>
> Only for mutexes, not for rwlocks.
>
> But the other way round: turning it on, when it's off, is likely
> more important anyways, and that is missing.
I don't think it's more important anyways, unless you assume that
elision typically won't be turned on by default (which I don't think is
our goal here; we want to make use of it if possible, so we hope that we
can turn it on by default). We currently also use the same tuning
params for elision-by-default and explicitly eliding locks, so if we
assume it's on by default widely, programmers can't make much of a
difference by turning it on explicitly for particular locks.