mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: move napi_hash[] into read mostly section
We do not often add/delete a napi context. Moving napi_hash[] into read mostly section avoids potential false sharing. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d64b5e85bf
commit
6180d9de61
2 changed files with 5 additions and 1 deletions
|
@ -16,6 +16,10 @@
|
|||
struct hlist_head name[1 << (bits)] = \
|
||||
{ [0 ... ((1 << (bits)) - 1)] = HLIST_HEAD_INIT }
|
||||
|
||||
#define DEFINE_READ_MOSTLY_HASHTABLE(name, bits) \
|
||||
struct hlist_head name[1 << (bits)] __read_mostly = \
|
||||
{ [0 ... ((1 << (bits)) - 1)] = HLIST_HEAD_INIT }
|
||||
|
||||
#define DECLARE_HASHTABLE(name, bits) \
|
||||
struct hlist_head name[1 << (bits)]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue