]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
tcp: instrument how long TCP is limited by insufficient send buffer
authorFrancis Yan <francisyyan@gmail.com>
Mon, 28 Nov 2016 07:07:16 +0000 (23:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2016 15:04:24 +0000 (10:04 -0500)
commitb0f71bd3e190df827d25d7f19bf09037567f14b7
tree4f65ddefad045bc8a14d438a7ea6252212e51d3c
parent5615f88614a47d2b802e1d14d31b623696109276
tcp: instrument how long TCP is limited by insufficient send buffer

This patch measures the amount of time when TCP runs out of new data
to send to the network due to insufficient send buffer, while TCP
is still busy delivering (i.e. write queue is not empty). The goal
is to indicate either the send buffer autotuning or user SO_SNDBUF
setting has resulted network under-utilization.

The measurement starts conservatively by checking various conditions
to minimize false claims (i.e. under-estimation is more likely).
The measurement stops when the SOCK_NOSPACE flag is cleared. But it
does not account the time elapsed till the next application write.
Also the measurement only starts if the sender is still busy sending
data, s.t. the limit accounted is part of the total busy time.

Signed-off-by: Francis Yan <francisyyan@gmail.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c