Re: [PATCH net-next 1/2] tcp: measure rwnd-limited time
flat view
From: Soheil Hassas Yeganeh <hidden>
Date: 2016-09-07 05:08:03
On Tue, Sep 6, 2016 at 9:32 PM, Francis Y. Yan [off-list ref] wrote:
This patch measures the total time when TCP transmission is limited by receiver's advertised window (rwnd), and exports it in tcp_info as tcpi_rwnd_limited. The rwnd-limited time is defined as the period when the next segment to send by TCP cannot fit into rwnd. To measure it, we record the last timestamp when limited by rwnd (rwnd_limited_ts) and the total rwnd-limited time (rwnd_limited) in tcp_sock. Then we export the total rwnd-limited time so far in tcp_info, where by so far, we mean that if TCP transmission is still being limited by rwnd, the time interval since rwnd_limited_ts needs to be counted as well; otherwise, we simply export rwnd_limited. It is worth noting that we also have to add a new sequence counter (seqcnt) in tcp_sock to carefully handle tcp_info's reading of rwnd_limited_ts and rwnd_limited in order to get a consistent snapshot of both variables together. Signed-off-by: Francis Y. Yan <redacted> Signed-off-by: Yuchung Cheng <redacted>
Acked-by: Soheil Hassas Yeganeh <redacted>