summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-03-10 17:11:42 -0700
committerDavid S. Miller <davem@davemloft.net>2014-03-11 23:54:23 -0400
commit15dc36ebbbea7da35fff2c51b620c8333fc87528 (patch)
tree8da1869274a4800b33ec0666668b9a474f34f3c6 /net
parenta19a7ec8fc8eb32113efeaff2a1ceca273726e9b (diff)
downloadop-kernel-dev-15dc36ebbbea7da35fff2c51b620c8333fc87528.zip
op-kernel-dev-15dc36ebbbea7da35fff2c51b620c8333fc87528.tar.gz
pkt_sched: do not use rcu in tc_dump_qdisc()
Like all rtnetlink dump operations, we hold RTNL in tc_dump_qdisc(), so we do not need to use rcu protection to protect list of netdevices. This will allow preemption to occur, thus reducing latencies. Following patch adds explicit cond_resched() calls. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_api.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 1313145..272292e 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1434,9 +1434,9 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb)
s_idx = cb->args[0];
s_q_idx = q_idx = cb->args[1];
- rcu_read_lock();
idx = 0;
- for_each_netdev_rcu(net, dev) {
+ ASSERT_RTNL();
+ for_each_netdev(net, dev) {
struct netdev_queue *dev_queue;
if (idx < s_idx)
@@ -1459,8 +1459,6 @@ cont:
}
done:
- rcu_read_unlock();
-
cb->args[0] = idx;
cb->args[1] = q_idx;
OpenPOWER on IntegriCloud