]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit40e4649adac593e7c848e0f2e7989db0a478c9b8
tree39436424c7559b1ce55e49e7ca6b7d36d3d4d57b
parentffe740285236689be304cda09fc286066748505d
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