MEDIUM: move the ring's lock to only protect the readers list
authorWilly Tarreau <w@1wt.eu>
Wed, 28 Feb 2024 08:52:55 +0000 (09:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Mar 2024 17:34:19 +0000 (17:34 +0000)
commit3cdd3d27a8721ecb129a12e939d6f50b4b98ca73
treec87594d21eef9975e99c59c60fae6138690e50cf
parenteb3d5f464d5f90c18c488d5025982e0c59cc5416
MEDIUM: move the ring's lock to only protect the readers list

Now the lock is only taken around the readers list. With careful
ordering of writes to head/tail, the ring remains protected.

The perf is a bit better, though (1.54M msg/s vs 1.4M at 48T on
a 3rd gen EPYC, and 5.4M vs 5.3M for a 3C6T setup).
src/ring.c