From: Li RongQing The nf_conntrack_generation sequence counter is updated whenever conntrack table generations are bumped (e.g., during netns exit or heavy garbage collection). Under certain workloads, these updates can be frequent enough that the variable no longer fits the "read-mostly" criteria. Applying __read_mostly to a variable that is updated regularly can lead to cache line bouncing and performance degradation for other variables residing in the same section. Remove the annotation to let the variable reside in the standard data section. Signed-off-by: Li RongQing --- net/netfilter/nf_conntrack_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index d1f8eb7..233a281 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -204,7 +204,7 @@ EXPORT_SYMBOL_GPL(nf_conntrack_htable_size); unsigned int nf_conntrack_max __read_mostly; EXPORT_SYMBOL_GPL(nf_conntrack_max); -seqcount_spinlock_t nf_conntrack_generation __read_mostly; +seqcount_spinlock_t nf_conntrack_generation; static siphash_aligned_key_t nf_conntrack_hash_rnd; static u32 hash_conntrack_raw(const struct nf_conntrack_tuple *tuple, -- 2.9.4