This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Lock elision problems in glibc-2.18
- From: Andi Kleen <andi at firstfloor dot org>
- To: libc-alpha at sourceware dot org
- Date: Tue, 03 Sep 2013 08:10:40 -0700
- Subject: Re: Lock elision problems in glibc-2.18
- Authentication-results: sourceware.org; auth=none
- References: <20130823084916 dot GA5506 at linux dot vnet dot ibm dot com>
Dominik Vogt <vogt@linux.vnet.ibm.com> writes:
> The current implementation of pthread_mutex lock elision is
> problematic if software uses a glibc with elision and other pieces
> of code that use transactions (other libraries for example). The
> root cause of the problem is that transactions may be used in
> several independent contexts, but the cpu automatically nests
> these into the same transaction.
As I wrote we did that intentionally to make it possible to profile
lock busy. Profiling is very important.
In general if lock is busy the transaction is unlikely to survive
anyways, as the chance of conflict on the lock variable is quite high.
-Andi
--
ak@linux.intel.com -- Speaking for myself only