diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-05-16 17:45:08 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-05-16 19:54:50 +0200 |
commit | 17de501daabda6f5a1cb9c539bc3c3f885aeca10 (patch) | |
tree | 0c8f9cc2995733acd65a4ca3f675c257d2235f6f /target/linux/generic/patches-4.4/034-fq_codel-fix-memory-limitation-drift.patch | |
parent | 7bd10f9a2af8f498b003879b61c46750968a6c2c (diff) | |
download | master-31e0f0ae-17de501daabda6f5a1cb9c539bc3c3f885aeca10.tar.gz master-31e0f0ae-17de501daabda6f5a1cb9c539bc3c3f885aeca10.tar.bz2 master-31e0f0ae-17de501daabda6f5a1cb9c539bc3c3f885aeca10.zip |
kernel: backport patches for fq_codel queue memory limit support
Use it to replace the reduction in max packets/flows
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic/patches-4.4/034-fq_codel-fix-memory-limitation-drift.patch')
-rw-r--r-- | target/linux/generic/patches-4.4/034-fq_codel-fix-memory-limitation-drift.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/generic/patches-4.4/034-fq_codel-fix-memory-limitation-drift.patch b/target/linux/generic/patches-4.4/034-fq_codel-fix-memory-limitation-drift.patch new file mode 100644 index 0000000000..45fff7bae9 --- /dev/null +++ b/target/linux/generic/patches-4.4/034-fq_codel-fix-memory-limitation-drift.patch @@ -0,0 +1,40 @@ +From: Eric Dumazet <edumazet@google.com> +Date: Sun, 15 May 2016 18:16:38 -0700 +Subject: [PATCH] fq_codel: fix memory limitation drift + +memory_usage must be decreased in dequeue_func(), not in +fq_codel_dequeue(), otherwise packets dropped by Codel algo +are missing this decrease. + +Also we need to clear memory_usage in fq_codel_reset() + +Fixes: 95b58430abe7 ("fq_codel: add memory limitation per queue") +Signed-off-by: Eric Dumazet <edumazet@google.com> +--- + +--- a/net/sched/sch_fq_codel.c ++++ b/net/sched/sch_fq_codel.c +@@ -259,6 +259,7 @@ static struct sk_buff *dequeue(struct co + if (flow->head) { + skb = dequeue_head(flow); + q->backlogs[flow - q->flows] -= qdisc_pkt_len(skb); ++ q->memory_usage -= skb->truesize; + sch->q.qlen--; + } + return skb; +@@ -306,7 +307,6 @@ begin: + list_del_init(&flow->flowchain); + goto begin; + } +- q->memory_usage -= skb->truesize; + qdisc_bstats_update(sch, skb); + flow->deficit -= qdisc_pkt_len(skb); + /* We cant call qdisc_tree_reduce_backlog() if our qlen is 0, +@@ -343,6 +343,7 @@ static void fq_codel_reset(struct Qdisc + } + memset(q->backlogs, 0, q->flows_cnt * sizeof(u32)); + sch->q.qlen = 0; ++ q->memory_usage = 0; + } + + static const struct nla_policy fq_codel_policy[TCA_FQ_CODEL_MAX + 1] = { |