android_kernel_samsung_msm8976/net/core
Eric W. Biederman 850a545bd8 net: Move rcu_barrier from rollback_registered_many to netdev_run_todo.
This patch moves the rcu_barrier from rollback_registered_many
(inside the rtnl_lock) into netdev_run_todo (just outside the rtnl_lock).
This allows us to gain the full benefit of sychronize_net calling
synchronize_rcu_expedited when the rtnl_lock is held.

The rcu_barrier in rollback_registered_many was originally a synchronize_net
but was promoted to be a rcu_barrier() when it was found that people were
unnecessarily hitting the 250ms wait in netdev_wait_allrefs().  Changing
the rcu_barrier back to a synchronize_net is therefore safe.

Since we only care about waiting for the rcu callbacks before we get
to netdev_wait_allrefs() it is also safe to move the wait into
netdev_run_todo.

This was tested by creating and destroying 1000 tap devices and observing
/proc/lock_stat.  /proc/lock_stat reports this change reduces the hold
times of the rtnl_lock by a factor of 10.  There was no observable
difference in the amount of time it takes to destroy a network device.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-19 16:59:42 -04:00
..
datagram.c net: add skb frag size accessors 2011-10-19 03:10:46 -04:00
dev.c net: Move rcu_barrier from rollback_registered_many to netdev_run_todo. 2011-10-19 16:59:42 -04:00
dev_addr_lists.c net: remove ndo_set_multicast_list callback 2011-08-17 20:22:03 -07:00
drop_monitor.c
dst.c net: fix potential neighbour race in dst_ifdown() 2011-08-09 21:47:14 -07:00
ethtool.c net: consolidate and fix ethtool_ops->get_settings calling 2011-09-15 17:32:26 -04:00
fib_rules.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
filter.c rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER 2011-08-02 04:29:23 -07:00
flow.c net/flow: Fix potential memory leak 2011-10-17 19:18:42 -04:00
gen_estimator.c
gen_stats.c
iovec.c
kmap_skb.h net: convert core to skb paged frag APIs 2011-08-24 17:52:11 -07:00
link_watch.c net: linkwatch: allow vlans to get carrier changes faster 2011-09-15 15:36:34 -04:00
Makefile net: Compute protocol sequence numbers and fragment IDs using MD5. 2011-08-06 18:33:19 -07:00
neighbour.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
net-sysfs.c net: consolidate and fix ethtool_ops->get_settings calling 2011-09-15 17:32:26 -04:00
net-sysfs.h
net-traces.c
net_namespace.c
netevent.c
netpoll.c Merge branch 'master' of github.com:davem330/net 2011-09-22 03:23:13 -04:00
pktgen.c net: add skb frag size accessors 2011-10-19 03:10:46 -04:00
request_sock.c
rtnetlink.c if_link: Add additional parameter to IFLA_VF_INFO for spoof checking 2011-10-16 13:15:38 -07:00
scm.c af_unix: dont send SCM_CREDENTIALS by default 2011-09-28 13:29:50 -04:00
secure_seq.c net: Compute protocol sequence numbers and fragment IDs using MD5. 2011-08-06 18:33:19 -07:00
skbuff.c net: Allow skb_recycle_check to be done in stages 2011-10-19 15:59:45 -04:00
sock.c net: more accurate skb truesize 2011-10-13 16:05:07 -04:00
stream.c
sysctl_net_core.c
timestamping.c
user_dma.c net: add skb frag size accessors 2011-10-19 03:10:46 -04:00
utils.c