• Francis Yan's avatar
    tcp: instrument tcp sender limits chronographs · 05b055e8
    Francis Yan authored
    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: default avatarFrancis Yan <francisyyan@gmail.com>
    Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
    Signed-off-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
    Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    05b055e8
tcp.h 58.8 KB