linux_dsm_epyc7002/net/sched
Eric Dumazet 95b58430ab fq_codel: add memory limitation per queue
On small embedded routers, one wants to control maximal amount of
memory used by fq_codel, instead of controlling number of packets or
bytes, since GRO/TSO make these not practical.

Assuming skb->truesize is accurate, we have to keep track of
skb->truesize sum for skbs in queue.

This patch adds a new TCA_FQ_CODEL_MEMORY_LIMIT attribute.

I chose a default value of 32 MBytes, which looks reasonable even
for heavy duty usages. (Prior fq_codel users should not be hurt
when they upgrade their kernels)

Two fields are added to tc_fq_codel_qd_stats to report :
 - Current memory usage
 - Number of drops caused by memory limits

# tc qd replace dev eth1 root est 1sec 4sec fq_codel memory_limit 4M
..
# tc -s -d qd sh dev eth1
qdisc fq_codel 8008: root refcnt 257 limit 10240p flows 1024
 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 2083566791363 bytes 1376214889 pkt (dropped 4994406, overlimits 0
requeues 21705223)
 rate 9841Mbit 812549pps backlog 3906120b 376p requeues 21705223
  maxpacket 68130 drop_overlimit 4994406 new_flow_count 28855414
  ecn_mark 0 memory_used 4190048 drop_overmemory 4994406
  new_flows_len 1 old_flows_len 177

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Dave Täht <dave.taht@gmail.com>
Cc: Sebastian Möller <moeller0@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-08 23:49:38 -04:00
..
act_api.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
act_bpf.c bpf: wire in data and data_end for cls_act_bpf 2016-05-06 16:01:54 -04:00
act_connmark.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
act_csum.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
act_gact.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
act_ife.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
act_ipt.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
act_meta_mark.c
act_meta_skbprio.c
act_mirred.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
act_nat.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
act_pedit.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
act_police.c
act_simple.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
act_skbedit.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
act_vlan.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
cls_api.c
cls_basic.c
cls_bpf.c bpf: wire in data and data_end for cls_act_bpf 2016-05-06 16:01:54 -04:00
cls_cgroup.c
cls_flow.c
cls_flower.c
cls_fw.c
cls_route.c
cls_rsvp6.c
cls_rsvp.c
cls_rsvp.h
cls_tcindex.c
cls_u32.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
em_canid.c
em_cmp.c
em_ipset.c
em_meta.c qdisc: constify meta_type_ops structures 2016-04-14 00:35:30 -04:00
em_nbyte.c
em_text.c
em_u32.c
ematch.c
Kconfig
Makefile
sch_api.c sched: align nlattr properly when needed 2016-04-26 12:00:49 -04:00
sch_atm.c
sch_blackhole.c
sch_cbq.c
sch_choke.c
sch_codel.c codel: split into multiple files 2016-04-25 16:44:27 -04:00
sch_drr.c
sch_dsmark.c
sch_fifo.c
sch_fq_codel.c fq_codel: add memory limitation per queue 2016-05-08 23:49:38 -04:00
sch_fq.c
sch_generic.c net: remove dev->trans_start 2016-05-04 14:16:50 -04:00
sch_gred.c
sch_hfsc.c
sch_hhf.c
sch_htb.c sched: use nla_put_u64_64bit() 2016-04-25 15:09:09 -04:00
sch_ingress.c
sch_mq.c
sch_mqprio.c
sch_multiq.c
sch_netem.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-05-04 00:52:29 -04:00
sch_pie.c
sch_plug.c
sch_prio.c
sch_qfq.c
sch_red.c
sch_sfb.c
sch_sfq.c
sch_tbf.c sched: use nla_put_u64_64bit() 2016-04-25 15:09:09 -04:00
sch_teql.c