From: Willy Tarreau Date: Sat, 10 Apr 2021 15:38:05 +0000 (+0200) Subject: MINOR: protocol: move __protocol_by_family to read_mostly X-Git-Tag: v2.4-dev17~152 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad6722ea3a61d320297610a64022ffc7e25f1b5e;p=thirdparty%2Fhaproxy.git MINOR: protocol: move __protocol_by_family to read_mostly This one is used for each outgoing connection and never changes after boot, move it to read_mostly. --- diff --git a/src/protocol.c b/src/protocol.c index 77396d0f8e..cd574f2b25 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -24,7 +24,7 @@ /* List head of all registered protocols */ static struct list protocols = LIST_HEAD_INIT(protocols); -struct protocol *__protocol_by_family[AF_CUST_MAX][2][2] = { }; +struct protocol *__protocol_by_family[AF_CUST_MAX][2][2] __read_mostly = { }; /* This is the global spinlock we may need to register/unregister listeners or * protocols. Its main purpose is in fact to serialize the rare stop/deinit()