]> 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)
commit46a4b1a4e464d82a35122fc14aa6f3b2f9e12f56
treeca86c03450fafdc89dac98ce403b1906fcaa025d
parent9221365f9a4af24faf91e60fd3469c76bc0b0176
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