[PATCH 2/6] Fall back to locking if elision runs out of retries.
Dominik Vogt
vogt@linux.vnet.ibm.com
Tue Sep 3 07:19:00 GMT 2013
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
More information about the Libc-alpha
mailing list