diff options
author | Florian Westphal <fw@strlen.de> | 2016-10-31 00:35:07 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-11-01 20:50:33 +0100 |
commit | 886bc50348fd69972baa4616ce95b7dc9ff8afe7 (patch) | |
tree | c79281c68edba4dea269def458998eb0456b7982 /net/netfilter/nfnetlink_queue.c | |
parent | e41e9d623cd77dbe970b15a4c06a0765c3657bdd (diff) | |
download | linux-886bc50348fd69972baa4616ce95b7dc9ff8afe7.tar.gz linux-886bc50348fd69972baa4616ce95b7dc9ff8afe7.tar.bz2 linux-886bc50348fd69972baa4616ce95b7dc9ff8afe7.zip |
netfilter: nf_queue: place volatile data in own cacheline
As the comment indicates, the data at the end of nfqnl_instance struct is
written on every queue/dequeue, so it should reside in its own cacheline.
Before this change, 'lock' was in first cacheline so we dirtied both.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nfnetlink_queue.c')
-rw-r--r-- | net/netfilter/nfnetlink_queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index af832c526048..5379f788a372 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c @@ -69,7 +69,7 @@ struct nfqnl_instance { * Following fields are dirtied for each queued packet, * keep them in same cache line if possible. */ - spinlock_t lock; + spinlock_t lock ____cacheline_aligned_in_smp; unsigned int queue_total; unsigned int id_sequence; /* 'sequence' of pkt ids */ struct list_head queue_list; /* packets in queue */ |