netfilter: connlimit: move lock array out of struct connlimit_data
authorFlorian Westphal <fw@strlen.de>
Thu, 20 Mar 2014 10:53:39 +0000 (11:53 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 3 Apr 2014 21:52:13 +0000 (23:52 +0200)
commite00b437b3d6d4d26ecd95108b575ee1bcfcb478f
tree39436424c7559b1ce55e49e7ca6b7d36d3d4d57b
parente5ac6eafba887821044c65b6fe59d9eb8b7c7f61
netfilter: connlimit: move lock array out of struct connlimit_data

Eric points out that the locks can be global.
Moreover, both Jesper and Eric note that using only 32 locks increases
false sharing as only two cache lines are used.

This increases locks to 256 (16 cache lines assuming 64byte cacheline and
4 bytes per spinlock).

Suggested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_connlimit.c