Re: [PATCH RFC] futex: avoid false sharing between hb->chain and the bucket lock

From: Breno Leitao

Date: Tue Jun 23 2026 - 06:31:47 EST


On Wed, Jun 10, 2026 at 06:56:12AM -0700, Breno Leitao wrote:
> .. same machine I used earlier 176-thread AMD EPYC host, 10s perf bench
> futex hash per run, baseline = parent commit (acb7500801e98):

I tested this on a large AI machine (NVIDIA GB200 NVL72), and the results
show the highest gains observed so far.

Test setup:

Each kernel was measured over 5 runs of the default workload (144 threads,
1024 private futexes per thread, 10s per run; the futex hash auto-resized to
1024 buckets in both cases).

Results:

The optimization shows a clear, repeatable win on this hardware. The baseline
averaged 1,149,586 ops/sec (range 1.14M-1.17M) while the patched kernel
averaged 1,764,233 ops/sec (range 1.75M-1.77M) — a ~53% throughput improvement
(1.53x).

Run-to-run variance was low (~1%) and the two distributions did not
overlap at all (baseline max sits well below the patched minimum), confirming
the gain is statistically significant.