This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 1/3] PowerPC: Add the lock elision using HTM
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 12 Feb 2015 09:40:11 -0200
- Subject: Re: [PATCH v2 1/3] PowerPC: Add the lock elision using HTM
- Authentication-results: sourceware.org; auth=none
- References: <5491C98F dot 6030006 at linux dot vnet dot ibm dot com> <mvmzj8j8n54 dot fsf at hawking dot suse dot de>
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.