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.
This commit is contained in:
Willy Tarreau 2021-04-10 17:38:05 +02:00
parent 14015b8880
commit ad6722ea3a

View File

@ -24,7 +24,7 @@
/* List head of all registered protocols */ /* List head of all registered protocols */
static struct list protocols = LIST_HEAD_INIT(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 /* 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() * protocols. Its main purpose is in fact to serialize the rare stop/deinit()