[PATCH v2 1/3] PowerPC: Add the lock elision using HTM
Adhemerval Zanella
azanella@linux.vnet.ibm.com
Thu Feb 12 11:40:00 GMT 2015
On 12-02-2015 08:00, Andreas Schwab wrote:
> Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes:
>
>> This patch adds support for lock elision using ISA 2.07 hardware
>> transactional memory instructions for pthread_mutex primitives.
>> Similar to s390 version, the for elision logic defined in
>> 'force-elision.h' is only enabled if ENABLE_LOCK_ELISION is defined.
>>
>> Also, the lock elision code should be able to be built even with
>> a compiler that does not provide HTM support with builtins.
>> However I have noted the performance is sub-optimal due scheduling
>> pressures.
>>
>> Tested on powerpc64 and powerpc32.
> Did you test it on powerpc64le? perl is behaving very erroneously:
>
> $ perl -e 'open(F, "echo foo |"); print while (<F>)' | wc -l
> 250
>
> Something is causing fork to be reentered repeatedly, at random (the
> number of processes varies between runs).
>
> Andreas.
>
Yes, but only with a toolchain with HTM builtin support configured to set
default -mcpu to power8 (my fault). The problem is the TABORT encoding
for older toolchain being wrong for LE. I have pushed 6f7415033813c to
fix it and both make check the perl example you provided works OK now.
More information about the Libc-alpha
mailing list