From c2687f587e95927831b22ae6d8d7a618d2731b5c Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 11 Aug 2025 17:36:39 +0200 Subject: [PATCH] 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. --- src/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection.c b/src/connection.c index 0235e3a2a..18b4a4111 100644 --- a/src/connection.c +++ b/src/connection.c @@ -38,7 +38,7 @@ #include -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); -- 2.47.3