OPTIM: connection: align connection pools to 64

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.
This commit is contained in:
Willy Tarreau 2025-08-11 17:36:39 +02:00
parent d6095fcfe6
commit c2687f587e

View File

@ -38,7 +38,7 @@
#include <haproxy/xxhash.h> #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_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_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); DECLARE_TYPED_POOL(pool_head_pp_tlv_128, "pp_tlv_128", struct conn_tlv_list, HA_PP2_TLV_VALUE_128);