summaryrefslogtreecommitdiff
path: root/include/linux/net_tstamp.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2011-10-14 02:25:23 +0400
committerDavid S. Miller <davem@davemloft.net>2011-10-20 00:59:42 +0400
commit850a545bd8a41648445bfc5541afe36ca105b0b8 (patch)
treec3d3da6af635780cc67bcd95951aa21d7b435442 /include/linux/net_tstamp.h
parent06a59ecb921de1d44efcf2cdf543bc689fe2e0d8 (diff)
downloadlinux-850a545bd8a41648445bfc5541afe36ca105b0b8.tar.xz
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>
Diffstat (limited to 'include/linux/net_tstamp.h')
0 files changed, 0 insertions, 0 deletions