This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 0/2] aarch64: non lazy tlsdesc
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com
- Date: Fri, 20 Oct 2017 15:04:30 +0100
- Subject: Re: [PATCH 0/2] aarch64: non lazy tlsdesc
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <59D791A6.10507@arm.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 06/10/17 15:22, Szabolcs Nagy wrote:
> lazy initialization of tlsdesc GOT entries is problematic on weak
> memory models, the data race was fixed by adding a synchronization
> barrier in the tlsdesc functions which run at every tls access:
> https://sourceware.org/ml/libc-alpha/2015-06/msg00496.html
>
> this obviously has significant performance impact, so the real fix
> is to remove lazy initialization, which is not a useful feature,
> and drop all the complicated runtime code for it.
>
> such a change would be useful to do generically for all tlsdesc
> targets (even where no barriers are needed for lazy initialization),
> but i did not see a clean way to special case tlsdesc relocs in
> the generic elf/do-rel.h code, so this is for aarch64 only (and
> i plan to submit a separate patch for arm too).
>
> Szabolcs Nagy (2):
> aarch64: Disable lazy symbol binding of TLSDESC
> aarch64: Remove barriers from TLS descriptor functions
>
> elf/tlsdeschtab.h | 2 +
i'd like to get review on this generic change in the second patch.
and waiting for comments whether a generic solution is desirable
or applying similar patch to arm is ok.
> sysdeps/aarch64/dl-machine.h | 23 +++--
> sysdeps/aarch64/dl-tlsdesc.S | 203 -------------------------------------------
> sysdeps/aarch64/dl-tlsdesc.h | 9 --
> sysdeps/aarch64/tlsdesc.c | 127 +--------------------------
> 5 files changed, 17 insertions(+), 347 deletions(-)
>