]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net: avoid synchronize_rcu() in dev_deactivate_many
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 19 May 2011 23:42:09 +0000 (23:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 May 2011 01:01:20 +0000 (21:01 -0400)
commit3137663dfb43bb3e3174e9da81db0c05f395fc1b
treed3a09e8eb8655215c9a730da6798e9623f7f0d03
parent6df427fe8c481d3be437cbe8bd366bdac82b73c4
net: avoid synchronize_rcu() in dev_deactivate_many

dev_deactivate_many() issues one synchronize_rcu() call after qdiscs set
to noop_qdisc.

This call is here to make sure they are no outstanding qdisc-less
dev_queue_xmit calls before returning to caller.

But in dismantle phase, we dont have to wait, because we wont activate
again the device, and we are going to wait one rcu grace period later in
rollback_registered_many().

After this patch, device dismantle uses one synchronize_net() and one
rcu_barrier() call only, so we have a ~30% speedup and a smaller RTNL
latency.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Patrick McHardy <kaber@trash.net>,
CC: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_generic.c