]> git.baikalelectronics.ru Git - kernel.git/commit
fib: avoid false sharing on fib_table_hash
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 13 Oct 2010 08:22:03 +0000 (08:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Oct 2010 18:13:23 +0000 (11:13 -0700)
commit72f95572c227036c59a63c2fb1e778b457e4e68d
tree517c39912a0aea9d4da3c3915c78e832dfbba855
parent9bce215068ad92746ede240bd5d2b6004277c083
fib: avoid false sharing on fib_table_hash

While doing profile analysis, I found fib_hash_table was sometime in a
cache line shared by a possibly often written kernel structure.

(CONFIG_IP_ROUTE_MULTIPATH || !CONFIG_IPV6_MULTIPLE_TABLES)

It's hard to detect because not easily reproductible.

Make sure we allocate a full cache line to keep this shared in all cpus
caches.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_frontend.c
net/ipv6/ip6_fib.c