original_kernel/net/ipv6
Eric Dumazet 0604475119 tcp: add TCPMemoryPressuresChrono counter
DRAM supply shortage and poor memory pressure tracking in TCP
stack makes any change in SO_SNDBUF/SO_RCVBUF (or equivalent autotuning
limits) and tcp_mem[] quite hazardous.

TCPMemoryPressures SNMP counter is an indication of tcp_mem sysctl
limits being hit, but only tracking number of transitions.

If TCP stack behavior under stress was perfect :
1) It would maintain memory usage close to the limit.
2) Memory pressure state would be entered for short times.

We certainly prefer 100 events lasting 10ms compared to one event
lasting 200 seconds.

This patch adds a new SNMP counter tracking cumulative duration of
memory pressure events, given in ms units.

$ cat /proc/sys/net/ipv4/tcp_mem
3088    4117    6176
$ grep TCP /proc/net/sockstat
TCP: inuse 180 orphan 0 tw 2 alloc 234 mem 4140
$ nstat -n ; sleep 10 ; nstat |grep Pressure
TcpExtTCPMemoryPressures        1700
TcpExtTCPMemoryPressuresChrono  5209

v2: Used EXPORT_SYMBOL_GPL() instead of EXPORT_SYMBOL() as David
instructed.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-08 11:26:19 -04:00
..
ila net: add extack arg to lwtunnel build state 2017-05-30 11:55:32 -04:00
netfilter sk_buff: remove support for csum_bad in sk_buff 2017-05-19 19:21:29 -04:00
Kconfig
Makefile
addrconf.c net: ipv6: Plumb extack through route add functions 2017-05-22 12:12:20 -04:00
addrconf_core.c
addrlabel.c
af_inet6.c
ah6.c ipsec: check return value of skb_to_sgvec always 2017-06-04 23:01:47 -04:00
anycast.c
calipso.c net/ipv6: Fix CALIPSO causing GPF with datagram support 2017-06-06 15:18:20 -04:00
datagram.c
esp6.c ipsec: check return value of skb_to_sgvec always 2017-06-04 23:01:47 -04:00
esp6_offload.c
exthdrs.c
exthdrs_core.c
exthdrs_offload.c
fib6_rules.c
fou6.c fou: make local function static 2017-05-21 13:42:36 -04:00
icmp.c
inet6_connection_sock.c
inet6_hashtables.c
ip6_checksum.c
ip6_fib.c net: ipv6: Add extack messages for route add failures 2017-05-22 12:12:20 -04:00
ip6_flowlabel.c
ip6_gre.c ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets 2017-05-26 14:54:39 -04:00
ip6_icmp.c
ip6_input.c
ip6_offload.c ipv6: Fix leak in ipv6_gso_segment(). 2017-06-04 21:41:10 -04:00
ip6_offload.h
ip6_output.c ipv6: fix out of bound writes in __ip6_append_data() 2017-05-22 11:47:44 -04:00
ip6_tunnel.c ip6_tunnel: fix traffic class routing for tunnels 2017-06-04 19:49:33 -04:00
ip6_udp_tunnel.c
ip6_vti.c
ip6mr.c
ipcomp6.c
ipv6_sockglue.c
mcast.c
mcast_snoop.c
mip6.c
ndisc.c
netfilter.c
output_core.c ipv6: Prevent overrun when parsing v6 header options 2017-05-17 14:55:59 -04:00
ping.c net: ping: do not abuse udp_poll() 2017-06-04 22:56:55 -04:00
proc.c
protocol.c
raw.c net: ping: do not abuse udp_poll() 2017-06-04 22:56:55 -04:00
reassembly.c
route.c net: add extack arg to lwtunnel build state 2017-05-30 11:55:32 -04:00
seg6.c ipv6: drop unused variables in seg6_genl_dumphac 2017-05-21 13:42:36 -04:00
seg6_hmac.c
seg6_iptunnel.c net: add extack arg to lwtunnel build state 2017-05-30 11:55:32 -04:00
sit.c Revert "sit: reload iphdr in ipip6_rcv" 2017-06-06 11:34:06 -04:00
syncookies.c tcp: Namespaceify sysctl_tcp_timestamps 2017-06-08 10:53:29 -04:00
sysctl_net_ipv6.c
tcp_ipv6.c tcp: add TCPMemoryPressuresChrono counter 2017-06-08 11:26:19 -04:00
tcpv6_offload.c
tunnel6.c
udp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-18 16:11:32 -04:00
udp_impl.h udp: make *udp*_queue_rcv_skb() functions static 2017-05-18 10:23:33 -04:00
udp_offload.c ipv6: Check ip6_find_1stfragopt() return value properly. 2017-05-17 22:54:11 -04:00
udplite.c
xfrm6_input.c
xfrm6_mode_beet.c
xfrm6_mode_ro.c ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() 2017-06-02 13:57:27 -04:00
xfrm6_mode_transport.c ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() 2017-06-02 13:57:27 -04:00
xfrm6_mode_tunnel.c
xfrm6_output.c
xfrm6_policy.c
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c