This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/6] Fall back to locking if elision runs out of retries.
- From: Dominik Vogt <vogt at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Cc: andi at firstfloor dot org
- Date: Tue, 3 Sep 2013 09:19:39 +0200
- Subject: Re: [PATCH 2/6] Fall back to locking if elision runs out of retries.
- Authentication-results: sourceware.org; auth=none
- References: <20130902075228 dot GA4792 at linux dot vnet dot ibm dot com> <20130902075946 dot GB4997 at linux dot vnet dot ibm dot com> <87zjrvc4oj dot fsf at tassilo dot jf dot intel dot com>
- Reply-to: libc-alpha at sourceware dot org
On Mon, Sep 02, 2013 at 02:08:28PM -0700, Andi Kleen wrote:
> Dominik Vogt <vogt@linux.vnet.ibm.com> writes:
>
> > With the old code, elision would never be disabled if every transaction aborts
> > with a temporary failure. This patch introduces a new configuration value that
> > is used whenever pthread_mutex_lock runs out of retries.
>
> I don't know what is a temporary failure?
An abort with the retry flag set in the abort code. In z
terminology that is called a temporary abort, and an abort without
the retry flag is called persistent.
> AFAIK all the abort situations on TSX were already covered.
If elision aborts with the retry flag several times in a row so
that the retry counter overflows, the normal lock is used once,
and next time elision is tried again. If all aborts have the
retry flag set, the old code _never_ disables elision, and that's
why the change is necessary.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany