[PATCH v6 3/4] Reduce CAS in malloc spinlocks

Wilco Dijkstra Wilco.Dijkstra@arm.com
Mon Nov 15 13:01:57 GMT 2021


Hi,

A quick check shows that the atomic loads are always inserted before the first
CAS, and since these locks are mostly uncontended, this will actually hurt
performance on all targets. Also, it's not like we've ever had complaints about
the number of arenas we can create in malloc by having all CPUs create one at
exactly the same time...

So a change like this really need to show gains in malloc benchmarks.

Cheers,
Wilco


More information about the Libc-alpha mailing list