diff options
author | Eric Dumazet <edumazet@google.com> | 2015-11-18 06:31:01 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-18 16:17:42 -0500 |
commit | 6180d9de61a5c461f9e3efef5417a844701dbbb2 (patch) | |
tree | 721d4b7a92759fe2951844e6a6f8474cb5fccf97 /include/linux/hashtable.h | |
parent | d64b5e85bfe2fe4c790abcbd16d9ae32391ddd7e (diff) | |
download | op-kernel-dev-6180d9de61a5c461f9e3efef5417a844701dbbb2.zip op-kernel-dev-6180d9de61a5c461f9e3efef5417a844701dbbb2.tar.gz |
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>
Diffstat (limited to 'include/linux/hashtable.h')
-rw-r--r-- | include/linux/hashtable.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/hashtable.h b/include/linux/hashtable.h index 519b6e2..661e5c2 100644 --- a/include/linux/hashtable.h +++ b/include/linux/hashtable.h @@ -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)] |