[PATCH 3/3] nptl: Only initialize robust list at mutex usage

Florian Weimer fweimer@redhat.com
Tue Jul 29 20:28:21 GMT 2025


* Adhemerval Zanella:

> The robust mutex kernel initialization is always performed at process
> startup and thread creation, even when the process does not use any
> robust mutexes.  This patch moves the set_robust_issue syscall to
> either when a robust process is initialized or used, saving the
> syscall issue for processes that do not use robust mutexes.
>
> The field futex_offset is used as a sentinel to indicate whether the
> struct pthread list is already initialized.  This also allows to move
> the __nptl_set_robust_list_avail from ld.so to libc.so, since there is
> no need to initialize it at pthread startup.

Why is this in optimization?  It adds a function call to the robust
mutex locking path.

Thanks,
Florian



More information about the Libc-alpha mailing list