summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-11-18 14:31:01 (GMT)
committerDavid S. Miller <davem@davemloft.net>2015-11-18 21:17:42 (GMT)
commit6180d9de61a5c461f9e3efef5417a844701dbbb2 (patch)
tree721d4b7a92759fe2951844e6a6f8474cb5fccf97 /net
parentd64b5e85bfe2fe4c790abcbd16d9ae32391ddd7e (diff)
downloadlinux-6180d9de61a5c461f9e3efef5417a844701dbbb2.tar.xz
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 'net')
-rw-r--r--net/core/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index ff58a8b..02dfbd9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -184,7 +184,7 @@ EXPORT_SYMBOL(dev_base_lock);
static DEFINE_SPINLOCK(napi_hash_lock);
static unsigned int napi_gen_id = NR_CPUS;
-static DEFINE_HASHTABLE(napi_hash, 8);
+static DEFINE_READ_MOSTLY_HASHTABLE(napi_hash, 8);
static seqcount_t devnet_rename_seq;