]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: percpu nh_rth_output cache
authorEric Dumazet <edumazet@google.com>
Tue, 31 Jul 2012 05:45:30 +0000 (05:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Jul 2012 21:41:39 +0000 (14:41 -0700)
commitd81396c72ff4e35677db289d941a0d2b154333d9
treeca86c03450fafdc89dac98ce403b1906fcaa025d
parent79cd0fa4f016faf69e9a9741715ad2d42ab06d00
ipv4: percpu nh_rth_output cache

Input path is mostly run under RCU and doesnt touch dst refcnt

But output path on forwarding or UDP workloads hits
badly dst refcount, and we have lot of false sharing, for example
in ipv4_mtu() when reading rt->rt_pmtu

Using a percpu cache for nh_rth_output gives a nice performance
increase at a small cost.

24 udpflood test on my 24 cpu machine (dummy0 output device)
(each process sends 1.000.000 udp frames, 24 processes are started)

before : 5.24 s
after : 2.06 s
For reference, time on linux-3.5 : 6.60 s

Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip_fib.h
net/ipv4/fib_semantics.c
net/ipv4/route.c