]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
tcp: instrument tcp sender limits chronographs
authorFrancis Yan <francisyyan@gmail.com>
Mon, 28 Nov 2016 07:07:13 +0000 (23:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2016 15:04:24 +0000 (10:04 -0500)
commit05b055e89121394058c75dc354e9a46e1e765579
treef4f070fbc44650c700ab3b57fe3ff35080e4df08
parenta090994980a15f8cc14fc188b5929bd61d2ae9c3
tcp: instrument tcp sender limits chronographs

This patch implements the skeleton of the TCP chronograph
instrumentation on sender side limits:

1) idle (unspec)
2) busy sending data other than 3-4 below
3) rwnd-limited
4) sndbuf-limited

The limits are enumerated 'tcp_chrono'. Since a connection in
theory can idle forever, we do not track the actual length of this
uninteresting idle period. For the rest we track how long the sender
spends in each limit. At any point during the life time of a
connection, the sender must be in one of the four states.

If there are multiple conditions worthy of tracking in a chronograph
then the highest priority enum takes precedence over
the other conditions. So that if something "more interesting"
starts happening, stop the previous chrono and start a new one.

The time unit is jiffy(u32) in order to save space in tcp_sock.
This implies application must sample the stats no longer than every
49 days of 1ms jiffy.

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>
include/linux/tcp.h
include/net/tcp.h
net/ipv4/tcp_output.c