summaryrefslogtreecommitdiffstats
path: root/drivers/net/iseries_veth.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2009-04-17 13:52:48 +0200
committerDavid S. Miller <davem@davemloft.net>2009-04-17 13:52:48 +0200
commit573636cbafeba88f7c88832ae053dafe265bf94b (patch)
treed1acf4db4b18faf23771fd71f183acad1caf6641 /drivers/net/iseries_veth.c
parentwan/pc300_drv: convert to net_device_ops (diff)
downloadlinux-573636cbafeba88f7c88832ae053dafe265bf94b.tar.xz
linux-573636cbafeba88f7c88832ae053dafe265bf94b.zip
[PATCH] net: remove superfluous call to synchronize_net()
inet_register_protosw() function is responsible for adding a new inet protocol into a global table (inetsw[]) that is used with RCU rules. As soon as the store of the pointer is done, other cpus might see this new protocol in inetsw[], so we have to make sure new protocol is ready for use. All pending memory updates should thus be committed to memory before setting the pointer. This is correctly done using rcu_assign_pointer() synchronize_net() is typically used at unregister time, after unsetting the pointer, to make sure no other cpu is still using the object we want to dismantle. Using it at register time is only adding an artificial delay that could hide a real bug, and this bug could popup if/when synchronize_rcu() can proceed faster than now. This saves about 13 ms on boot time on a HZ=1000 8 cpus machine ;) (4 calls to inet_register_protosw(), and about 3200 us per call) Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/iseries_veth.c')
0 files changed, 0 insertions, 0 deletions