glibc/sysdeps/nptl
Stefan Liebler b9579342c6 Remove support for lock elision.
The support for lock elision was already deprecated with glibc 2.42:
commit 77438db8cf
"Mark support for lock elision as deprecated."
See also discussions:
https://sourceware.org/pipermail/libc-alpha/2025-July/168492.html

This patch removes the architecture specific support for lock elision
for x86, powerpc and s390 by removing the elision-conf.h, elision-conf.c,
elision-lock.c, elision-timed.c, elision-unlock.c, elide.h, htm.h/hle.h files.
Those generic files are also removed.

The architecture specific structures are adjusted and the elision fields are
marked as unused.  See struct_mutex.h files.
Furthermore in struct_rwlock.h, the leftover __rwelision was also removed.
Those were originally removed with commit 0377a7fde6
"nptl: Remove rwlock elision definitions"
and by chance reintroduced with commit 7df8af43ad
"nptl: Add struct_rwlock.h"

The common code (e.g. the pthread_mutex-files) are changed back to the time
before lock elision was introduced with the x86-support:
- commit 1cdbe57948
"Add the low level infrastructure for pthreads lock elision with TSX"
- commit b023e4ca99
"Add new internal mutex type flags for elision."
- commit 68cc29355f
"Add minimal test suite changes for elision enabled kernels"
- commit e8c659d74e
"Add elision to pthread_mutex_{try,timed,un}lock"
- commit 49186d21ef
"Disable elision for any pthread_mutexattr_settype call"
- commit 1717da59ae
"Add a configure option to enable lock elision and disable by default"

Elision is removed also from the tunables, the initialization part, the
pretty-printers and the manual.

Some extra handling in the testsuite is removed as well as the full tst-mutex10
testcase, which tested a race while enabling lock elision.

I've also searched the code for "elision", "elide", "transaction" and e.g.
cleaned some comments.

I've run the testsuite on x86_64 and s390x and run the build-many-glibcs.py
script.
Thanks to Sachin Monga, this patch is also tested on powerpc.

A NEWS entry also mentions the removal.
Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-11-18 14:21:13 +01:00
..
bits Remove support for lock elision. 2025-11-18 14:21:13 +01:00
sys
Implies
Makeconfig
Makefile
Subdirs
_Fork.c
aio_misc.h aio_suspend64: Fix clock discrepancy [BZ #32795] 2025-03-25 01:05:11 +01:00
cancellation-pc-check.h
dl-mutex.c
dl-thread_gscope_wait.c
dl-tls_init_tp.c nptl: clear the whole rseq area before registration 2025-02-21 22:21:25 +00:00
dl-tunables.list
fork.h nptl: Add support for setup guard pages with MADV_GUARD_INSTALL 2025-01-30 10:16:37 -03:00
futex-internal.h Remove futex_supports_pshared 2025-09-08 15:01:18 +02:00
gai_misc.h
internaltypes.h Revert __HAVE_64B_ATOMICS configure check 2025-11-14 14:05:20 -03:00
jmp-unwind.c
libc-lock.h
libc-lockP.h htl: Drop pthread-functions infrastructure 2025-11-13 23:23:13 +01:00
libc_start_call_main.h
lowlevellock-futex.h
lowlevellock.h Remove support for lock elision. 2025-11-18 14:21:13 +01:00
malloc-machine.h
proc_service.h
pthread-offsets.h
pthread.h nptl: PTHREAD_COND_INITIALIZER compatibility with pre-2.41 versions (bug 32786) 2025-03-13 07:43:33 +01:00
pthreadP.h Remove support for lock elision. 2025-11-18 14:21:13 +01:00
pthread_atfork_compat.h
pthread_early_init.h
pthread_mutex_backoff.h
pthread_mutex_conf.h
rseq-access.h Revert __HAVE_64B_ATOMICS configure check 2025-11-14 14:05:20 -03:00
setxid.h
stdio-lock.h
tcb-access.h
tcb-offsets.h
thread_db.h
timer_routines.h
tst-mqueue8x.c