summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/pkt_sched.h
diff options
context:
space:
mode:
authorEric Dumazet2016-05-02 01:47:26 +0200
committerDavid S. Miller2016-05-03 18:47:09 +0200
commit9d18562a227874289fda8ca5d117d8f503f1dcca (patch)
treec00c1688e73773f12f3071998bcf20679695dc8e /include/uapi/linux/pkt_sched.h
parentravb: Remove rx buffer ALIGN (diff)
downloadkernel-qcow2-linux-9d18562a227874289fda8ca5d117d8f503f1dcca.tar.gz
kernel-qcow2-linux-9d18562a227874289fda8ca5d117d8f503f1dcca.tar.xz
kernel-qcow2-linux-9d18562a227874289fda8ca5d117d8f503f1dcca.zip
fq_codel: add batch ability to fq_codel_drop()
In presence of inelastic flows and stress, we can call fq_codel_drop() for every packet entering fq_codel qdisc. fq_codel_drop() is quite expensive, as it does a linear scan of 4 KB of memory to find a fat flow. Once found, it drops the oldest packet of this flow. Instead of dropping a single packet, try to drop 50% of the backlog of this fat flow, with a configurable limit of 64 packets per round. TCA_FQ_CODEL_DROP_BATCH_SIZE is the new attribute to make this limit configurable. With this strategy the 4 KB search is amortized to a single cache line per drop [1], so fq_codel_drop() no longer appears at the top of kernel profile in presence of few inelastic flows. [1] Assuming a 64byte cache line, and 1024 buckets Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Dave Taht <dave.taht@gmail.com> Cc: Jonathan Morton <chromatix99@gmail.com> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Dave Taht Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/pkt_sched.h')
-rw-r--r--include/uapi/linux/pkt_sched.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 1c78c7454c7c..a11afecd4482 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -718,6 +718,7 @@ enum {
TCA_FQ_CODEL_FLOWS,
TCA_FQ_CODEL_QUANTUM,
TCA_FQ_CODEL_CE_THRESHOLD,
+ TCA_FQ_CODEL_DROP_BATCH_SIZE,
__TCA_FQ_CODEL_MAX
};