]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: ring: always allocate properly aligned ring structures
authorWilly Tarreau <w@1wt.eu>
Wed, 13 Aug 2025 15:36:18 +0000 (17:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 13 Aug 2025 15:47:39 +0000 (17:47 +0200)
commita7f8693fa2c26495d4e4ac33827203278c454b74
tree33bf83c77cc16df6dc9e4952a93f30dc2477dbda
parentcfdab917feeef81e16dfb9e14710c92024d0ada3
MEDIUM: ring: always allocate properly aligned ring structures

The rings were manually padded to place the various areas that compose
them into different cache lines, provided that the allocator returned
a cache-aligned address, which until now was not granted. By now
switching to the aligned API we can finally have this guarantee and
hope for more consistent ring performance between tests. Like previously
the few carefully crafted THREAD_PAD() could simply be replaced by
generic THREAD_ALIGN() that dictate the type's alignment.

This was the last user of THREAD_PAD() by the way.
include/haproxy/ring-t.h
src/ring.c