]> git.feebdaed.xyz Git - 0xmirror/glibc.git/commit
nptl: Optimize trylock for high cache contention workloads (BZ #33704)
authorSunil K Pandey <sunil.k.pandey@intel.com>
Tue, 9 Dec 2025 16:57:44 +0000 (08:57 -0800)
committerSunil K Pandey <sunil.k.pandey@intel.com>
Thu, 18 Dec 2025 16:46:36 +0000 (08:46 -0800)
commit63716823dbad9482e09972907ae98e9cb00f9b86
treeba48852a39f32615734a4e51c464480e8aa02f98
parent15e0560ad32d85be2d9e7e53cd51dd5e1e851c16
nptl: Optimize trylock for high cache contention workloads (BZ #33704)

Check lock availability before acquisition to reduce cache line
bouncing.  Significantly improves trylock throughput on multi-core
systems under heavy contention.

Tested on x86_64.

Fixes BZ #33704.

Co-authored-by: Alex M Wells <alex.m.wells@intel.com>
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
nptl/pthread_mutex_trylock.c