summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_prio.c
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-11-07 17:33:40 -0800
committerDavid S. Miller <davem@davemloft.net>2018-11-08 16:19:48 -0800
commit7b8e0b6e659983154c8d7e756cdb833d89a3d4d7 (patch)
tree438bdeb87c63b301271e3666d4beeba899d6fa0b /net/sched/sch_prio.c
parent0c8d13ac96070000da33f394f45e9c19638483c5 (diff)
downloadlinux-7b8e0b6e659983154c8d7e756cdb833d89a3d4d7.tar.gz
linux-7b8e0b6e659983154c8d7e756cdb833d89a3d4d7.tar.bz2
linux-7b8e0b6e659983154c8d7e756cdb833d89a3d4d7.zip
net: sched: prio: delay destroying child qdiscs on change
Move destroying of the old child qdiscs outside of the sch_tree_lock() section. This should improve the software qdisc replace but is even more important for offloads. Calling offloads under a spin lock is best avoided, and child's destroy would be called under sch_tree_lock(). Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_prio.c')
-rw-r--r--net/sched/sch_prio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 63a90c5055ee..cdf68706e40f 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -220,7 +220,6 @@ static int prio_tune(struct Qdisc *sch, struct nlattr *opt,
qdisc_tree_reduce_backlog(child, child->q.qlen,
child->qstats.backlog);
- qdisc_put(child);
}
for (i = oldbands; i < q->bands; i++) {
@@ -230,6 +229,9 @@ static int prio_tune(struct Qdisc *sch, struct nlattr *opt,
}
sch_tree_unlock(sch);
+
+ for (i = q->bands; i < oldbands; i++)
+ qdisc_put(q->queues[i]);
return 0;
}