summaryrefslogtreecommitdiff
path: root/target/linux/generic
diff options
context:
space:
mode:
authorKevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>2016-05-07 09:57:18 +0100
committerJohn Crispin <john@phrozen.org>2016-05-12 03:29:36 +0200
commite288e1bd3210c2025f6fc0dd9c338ea9dbf04bca (patch)
treecab1c29f4f8b5925a07bf6709f5114a7baadc82b /target/linux/generic
parent374cae9e6fcaf4cf4de4f2095f3fec558da51df6 (diff)
downloadmtk-20170518-e288e1bd3210c2025f6fc0dd9c338ea9dbf04bca.zip
mtk-20170518-e288e1bd3210c2025f6fc0dd9c338ea9dbf04bca.tar.gz
mtk-20170518-e288e1bd3210c2025f6fc0dd9c338ea9dbf04bca.tar.bz2
kernel: fq_codel match flows_cnt to limit sizing
OpenWRT changed the default fq_codel sch->limit from 10240 to 1024, without also adjusting q->flows_cnt. Eric Dumazet explains below that you must also adjust the buckets (q->flows_cnt) for this not to break. Eric explains: Limit of 1024 packets and 1024 flows is not wise I think. (If all buckets are in use, each bucket has a virtual queue of 1 packet, which is almost the same than having no queue at all) I suggest to have at least 8 packets per bucket, to let Codel have a chance to trigger. So you could either reduce number of buckets to 128 (if memory is tight), or increase limit to 8192. flows_cnt is now set to 1024/8=128 Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/patches-3.18/660-fq_codel_defaults.patch6
-rw-r--r--target/linux/generic/patches-4.1/660-fq_codel_defaults.patch6
-rw-r--r--target/linux/generic/patches-4.4/660-fq_codel_defaults.patch6
3 files changed, 12 insertions, 6 deletions
diff --git a/target/linux/generic/patches-3.18/660-fq_codel_defaults.patch b/target/linux/generic/patches-3.18/660-fq_codel_defaults.patch
index 8c99e62..e0f73de 100644
--- a/target/linux/generic/patches-3.18/660-fq_codel_defaults.patch
+++ b/target/linux/generic/patches-3.18/660-fq_codel_defaults.patch
@@ -1,11 +1,13 @@
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
-@@ -387,7 +387,7 @@ static int fq_codel_init(struct Qdisc *s
+@@ -387,8 +387,8 @@ static int fq_codel_init(struct Qdisc *s
struct fq_codel_sched_data *q = qdisc_priv(sch);
int i;
- sch->limit = 10*1024;
+- q->flows_cnt = 1024;
+ sch->limit = 1024;
- q->flows_cnt = 1024;
++ q->flows_cnt = 128;
q->quantum = psched_mtu(qdisc_dev(sch));
q->perturbation = prandom_u32();
+ INIT_LIST_HEAD(&q->new_flows);
diff --git a/target/linux/generic/patches-4.1/660-fq_codel_defaults.patch b/target/linux/generic/patches-4.1/660-fq_codel_defaults.patch
index 8c99e62..e0f73de 100644
--- a/target/linux/generic/patches-4.1/660-fq_codel_defaults.patch
+++ b/target/linux/generic/patches-4.1/660-fq_codel_defaults.patch
@@ -1,11 +1,13 @@
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
-@@ -387,7 +387,7 @@ static int fq_codel_init(struct Qdisc *s
+@@ -387,8 +387,8 @@ static int fq_codel_init(struct Qdisc *s
struct fq_codel_sched_data *q = qdisc_priv(sch);
int i;
- sch->limit = 10*1024;
+- q->flows_cnt = 1024;
+ sch->limit = 1024;
- q->flows_cnt = 1024;
++ q->flows_cnt = 128;
q->quantum = psched_mtu(qdisc_dev(sch));
q->perturbation = prandom_u32();
+ INIT_LIST_HEAD(&q->new_flows);
diff --git a/target/linux/generic/patches-4.4/660-fq_codel_defaults.patch b/target/linux/generic/patches-4.4/660-fq_codel_defaults.patch
index cf4ff6f..5d99cd7 100644
--- a/target/linux/generic/patches-4.4/660-fq_codel_defaults.patch
+++ b/target/linux/generic/patches-4.4/660-fq_codel_defaults.patch
@@ -1,11 +1,13 @@
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
-@@ -412,7 +412,7 @@ static int fq_codel_init(struct Qdisc *s
+@@ -412,8 +412,8 @@ static int fq_codel_init(struct Qdisc *s
struct fq_codel_sched_data *q = qdisc_priv(sch);
int i;
- sch->limit = 10*1024;
+- q->flows_cnt = 1024;
+ sch->limit = 1024;
- q->flows_cnt = 1024;
++ q->flows_cnt = 128;
q->quantum = psched_mtu(qdisc_dev(sch));
q->perturbation = prandom_u32();
+ INIT_LIST_HEAD(&q->new_flows);