HomeFreeBSD

libthr: Add src.conf variable WITHOUT_PTHREADS_ASSERTIONS

Description

libthr: Add src.conf variable WITHOUT_PTHREADS_ASSERTIONS

This patch fixes a bug which prevents building libthr without
_PTHREADS_INVARIANTS defined. The default remains to build libthr
with -D_PTHREADS_INVARIANTS. However, with this patch, if one builds
libthr with WITHOUT_PTHREADS_ASSERTIONS=true then the latency to
acquire+release a default pthread mutex is reduced by roughly 5%, and a
robust mutex by roughly 18% (as measured by a simple synthetic test on a
Xeon E5-2697a based machine).

Reviewed by: jhb, kib, mjg
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D40900

Details

Provenance
becker.greg_att.netAuthored on Jul 7 2023, 12:30 AM
kibCommitted on Jul 7 2023, 1:45 AM
Reviewer
jhb
Differential Revision
D40900: Fix to allow building libthr without -D_PTHREADS_INVARIANTS defined
Parents
rG80bd5ef07025: vfs: factor out mount point traversal to a dedicated routine
Branches
Unknown
Tags
Unknown