[PATCH 0/2] aarch64: non lazy tlsdesc
Szabolcs Nagy
szabolcs.nagy@arm.com
Fri Oct 20 14:04:00 GMT 2017
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(-)
>
More information about the Libc-alpha
mailing list