alistair23-linux/net/core
Eric Dumazet be3fc413da net: use synchronize_rcu_expedited()
synchronize_rcu() is very slow in various situations (HZ=100,
CONFIG_NO_HZ=y, CONFIG_PREEMPT=n)

Extract from my (mostly idle) 8 core machine :

 synchronize_rcu() in 99985 us
 synchronize_rcu() in 79982 us
 synchronize_rcu() in 87612 us
 synchronize_rcu() in 79827 us
 synchronize_rcu() in 109860 us
 synchronize_rcu() in 98039 us
 synchronize_rcu() in 89841 us
 synchronize_rcu() in 79842 us
 synchronize_rcu() in 80151 us
 synchronize_rcu() in 119833 us
 synchronize_rcu() in 99858 us
 synchronize_rcu() in 73999 us
 synchronize_rcu() in 79855 us
 synchronize_rcu() in 79853 us

When we hold RTNL mutex, we would like to spend some cpu cycles but not
block too long other processes waiting for this mutex.

We also want to setup/dismantle network features as fast as possible at
boot/shutdown time.

This patch makes synchronize_net() call the expedited version if RTNL is
locked.

synchronize_rcu_expedited() typical delay is about 20 us on my machine.

 synchronize_rcu_expedited() in 18 us
 synchronize_rcu_expedited() in 18 us
 synchronize_rcu_expedited() in 18 us
 synchronize_rcu_expedited() in 18 us
 synchronize_rcu_expedited() in 20 us
 synchronize_rcu_expedited() in 16 us
 synchronize_rcu_expedited() in 20 us
 synchronize_rcu_expedited() in 18 us
 synchronize_rcu_expedited() in 18 us

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
CC: Ben Greear <greearb@candelatech.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-24 13:26:12 -04:00
..
datagram.c
dev.c net: use synchronize_rcu_expedited() 2011-05-24 13:26:12 -04:00
dev_addr_lists.c net,rcu: convert call_rcu(ha_rcu_free) to kfree_rcu() 2011-05-07 22:50:52 -07:00
drop_monitor.c net,rcu: convert call_rcu(free_dm_hw_stat) to kfree_rcu() 2011-05-07 22:50:59 -07:00
dst.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2011-05-20 13:43:21 -07:00
ethtool.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-05-17 17:33:11 -04:00
fib_rules.c net: dont hold rtnl mutex during netlink dump callbacks 2011-05-02 15:26:28 -07:00
filter.c net: filter: Use WARN_RATELIMIT 2011-05-23 17:37:43 -04:00
flow.c net: Make flow cache paths use a const struct flowi. 2011-02-22 18:44:31 -08:00
gen_estimator.c net,rcu: convert call_rcu(__gen_kill_estimator) to kfree_rcu() 2011-05-07 22:50:57 -07:00
gen_stats.c
iovec.c
kmap_skb.h
link_watch.c Fix common misspellings 2011-03-31 11:26:23 -03:00
Makefile
neighbour.c neigh: __rcu annotations 2011-01-20 16:59:34 -08:00
net-sysfs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2011-05-20 13:43:21 -07:00
net-sysfs.h
net-traces.c
net_namespace.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2011-05-20 13:43:21 -07:00
netevent.c
netpoll.c net: add mac_pton() for parsing MAC address 2011-05-09 12:10:49 -07:00
pktgen.c pktgen: refactor pg_init() code 2011-05-22 21:01:22 -04:00
request_sock.c
rtnetlink.c rtnetlink: ignore NETDEV_RELEASE and NETDEV_JOIN event 2011-05-22 21:01:19 -04:00
scm.c Allow passing O_PATH descriptors via SCM_RIGHTS datagrams 2011-03-15 02:21:45 -04:00
skbuff.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2011-05-20 13:43:21 -07:00
sock.c Fix common misspellings 2011-03-31 11:26:23 -03:00
stream.c
sysctl_net_core.c net: filter: Just In Time compiler for x86-64 2011-04-27 23:05:08 -07:00
timestamping.c
user_dma.c
utils.c net: add mac_pton() for parsing MAC address 2011-05-09 12:10:49 -07:00