From ad6722ea3a61d320297610a64022ffc7e25f1b5e Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sat, 10 Apr 2021 17:38:05 +0200 Subject: [PATCH] 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. --- src/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol.c b/src/protocol.c index 77396d0..cd574f2 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() -- 1.7.10.4