linux/net
Eric Dumazet 0197aa38df ipv4: rcu conversion in ip_route_output_slow
ip_route_output_slow() is enclosed in an rcu_read_lock() protected
section, so that no references are taken/released on device, thanks to
__ip_dev_find() & dev_get_by_index_rcu()

Tested with ip route cache disabled, and a stress test :

Before patch:

elapsed time :

real	1m38.347s
user	0m11.909s
sys	23m51.501s

Profile:

13788.00 22.7% ip_route_output_slow [kernel]
 7875.00 13.0% dst_destroy          [kernel]
 3925.00  6.5% fib_semantic_match   [kernel]
 3144.00  5.2% fib_rules_lookup     [kernel]
 3061.00  5.0% dst_alloc            [kernel]
 2276.00  3.7% rt_set_nexthop       [kernel]
 1762.00  2.9% fib_table_lookup     [kernel]
 1538.00  2.5% _raw_read_lock       [kernel]
 1358.00  2.2% ip_output            [kernel]

After patch:

real	1m28.808s
user	0m13.245s
sys	20m37.293s

10950.00 17.2% ip_route_output_slow [kernel]
10726.00 16.9% dst_destroy          [kernel]
 5170.00  8.1% fib_semantic_match   [kernel]
 3937.00  6.2% dst_alloc            [kernel]
 3635.00  5.7% rt_set_nexthop       [kernel]
 2900.00  4.6% fib_rules_lookup     [kernel]
 2240.00  3.5% fib_table_lookup     [kernel]
 1427.00  2.2% _raw_read_lock       [kernel]
 1157.00  1.8% kmem_cache_alloc     [kernel]

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-30 21:16:06 -07:00
..
9p net: return operator cleanup 2010-09-23 14:33:39 -07:00
802 net: return operator cleanup 2010-09-23 14:33:39 -07:00
8021q 8021q: Use netif_copy_real_num_queues() to set queue counts 2010-09-27 22:09:57 -07:00
appletalk
atm Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-09-27 01:03:03 -07:00
ax25
bluetooth net: return operator cleanup 2010-09-23 14:33:39 -07:00
bridge
caif caif: Use default send and receive buffer size in caif_socket. 2010-09-21 18:05:31 -07:00
can
core net: rename netdev rx_queue to ingress_queue 2010-09-29 13:25:53 -07:00
dcb
dccp net: return operator cleanup 2010-09-23 14:33:39 -07:00
decnet
dns_resolver
dsa
econet net: return operator cleanup 2010-09-23 14:33:39 -07:00
ethernet net: return operator cleanup 2010-09-23 14:33:39 -07:00
ieee802154
ipv4 ipv4: rcu conversion in ip_route_output_slow 2010-09-30 21:16:06 -07:00
ipv6 ip6tnl: percpu stats accounting 2010-09-29 13:25:52 -07:00
ipx
irda net: return operator cleanup 2010-09-23 14:33:39 -07:00
iucv
key net: return operator cleanup 2010-09-23 14:33:39 -07:00
l2tp net: constify some ppp/pptp structs 2010-09-21 18:04:47 -07:00
lapb
llc
mac80211 net: return operator cleanup 2010-09-23 14:33:39 -07:00
netfilter Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-09-27 01:03:03 -07:00
netlabel
netlink
netrom
packet
phonet Phonet: restore flow control credits when sending fails 2010-09-30 17:57:30 -07:00
rds Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-09-27 01:03:03 -07:00
rfkill net: return operator cleanup 2010-09-23 14:33:39 -07:00
rose Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-09-27 01:03:03 -07:00
rxrpc
sched net: rename netdev rx_queue to ingress_queue 2010-09-29 13:25:53 -07:00
sctp Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-09-27 01:03:03 -07:00
sunrpc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-09-27 01:03:03 -07:00
tipc net: return operator cleanup 2010-09-23 14:33:39 -07:00
unix
wanrouter
wimax
wireless Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-09-27 01:03:03 -07:00
x25 X.25 remove bkl in poll 2010-09-22 13:35:51 -07:00
xfrm
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE