[PATCH v2 3/4] Remove usage of TLS_MULTIPLE_THREADS_IN_TCB
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Mon Jun 13 21:31:37 GMT 2022
Hi Adhemerval,
> The x86 atomic need some adjustments since it has single-thread
> optimizationi builtin within the inline assemblye. It now uses
> SINGLE_THREAD_P and atomic optimizations are removed (since they
> are not used).
I'd suggest to remove all single-thread optimizations from target atomics.
Many aren't used at all (eg. catomic_or/catomic_and), and the rest has few
uses which are not performance critical. The uses in malloc.c are in fact
counterproductive since they are only used if there are multiple threads!
As a result I think you might not need any inline assembler at all.
I have a patch that removes all of the catomic definitions across GLIBC.
If we find code that could benefit then we can optimize it at a higher level
and in a generic way similar to how we optimized malloc or
https://sourceware.org/pipermail/libc-alpha/2022-June/139566.html.
Cheers,
Wilco
More information about the Libc-alpha
mailing list