]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: ring: align the head and tail fields in the ring_storage structure
authorWilly Tarreau <w@1wt.eu>
Wed, 28 Feb 2024 11:04:22 +0000 (12:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Mar 2024 17:34:19 +0000 (17:34 +0000)
commitdd8ea5d928527f262eba2004f1c9ec4779bb9e06
treeaf582e81d7bc2a11ee1a6313ffbdeba5d9d4c768
parentbf3dead20cdb36ad11230585d61da47c519af3f8
MEDIUM: ring: align the head and tail fields in the ring_storage structure

We really want to let the readers and writers act on different areas, so
we want to have the tail and the head on separate cache lines, themselves
separate from the rest of the ring. Doing so improves the performance from
2.15 to 2.35M msg/s at 48 threads on a 24-core EPYC.

This increases the header space from 32 to 192 bytes when threads are
enabled. But since we already have the header size available in the file,
haring remains able to detect the aligned vs unaligned formats and call
dump_v2a() when aligned is detected.
dev/haring/haring.c
include/haproxy/ring-t.h