]> 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)
commitf2a1b5e15e49b5e0818b5a0995b5d872ce43bd07
tree39436424c7559b1ce55e49e7ca6b7d36d3d4d57b
parent4c5ab17c6f6e0d6174d649a8ffd56095c36789c1
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