]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
OPTIM: connection: align connection pools to 64
authorWilly Tarreau <w@1wt.eu>
Mon, 11 Aug 2025 15:36:39 +0000 (17:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Aug 2025 17:55:30 +0000 (19:55 +0200)
The struct connection is used a lot by the muxes during many operations,
particularly at the beginning of the struct (flags, ctrl, xprt and mux).
We definitely want this one not to be falsely shared with another thread,
so let's align the pools to a cache line.

src/connection.c

index 0235e3a2a9199e4c10ce17a99d0c16419f4a29f3..18b4a4111816c2149410aa53958a174f532e57e2 100644 (file)
@@ -38,7 +38,7 @@
 #include <haproxy/xxhash.h>
 
 
-DECLARE_TYPED_POOL(pool_head_connection,     "connection",     struct connection);
+DECLARE_TYPED_POOL(pool_head_connection,     "connection",     struct connection, 0, 64);
 DECLARE_TYPED_POOL(pool_head_conn_hash_node, "conn_hash_node", struct conn_hash_node);
 DECLARE_TYPED_POOL(pool_head_sockaddr,       "sockaddr",       struct sockaddr_storage);
 DECLARE_TYPED_POOL(pool_head_pp_tlv_128,     "pp_tlv_128",     struct conn_tlv_list, HA_PP2_TLV_VALUE_128);