netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ycheng@google.com
Cc: netdev@vger.kernel.org, ncardwell@google.com, edumazet@google.com
Subject: Re: [PATCH net-next] tcp: usec resolution SYN/ACK RTT
Date: Mon, 21 Sep 2015 16:19:14 -0700 (PDT)	[thread overview]
Message-ID: <20150921.161914.1871041800702197631.davem@davemloft.net> (raw)
In-Reply-To: <1442601374-27885-1-git-send-email-ycheng@google.com>

From: Yuchung Cheng <ycheng@google.com>
Date: Fri, 18 Sep 2015 11:36:14 -0700

> Currently SYN/ACK RTT is measured in jiffies. For LAN the SYN/ACK
> RTT is often measured as 0ms or sometimes 1ms, which would affect
> RTT estimation and min RTT samping used by some congestion control.
> 
> This patch improves SYN/ACK RTT to be usec resolution if platform
> supports it. While the timestamping of SYN/ACK is done in request
> sock, the RTT measurement is carefully arranged to avoid storing
> another u64 timestamp in tcp_sock.
> 
> For regular handshake w/o SYNACK retransmission, the RTT is sampled
> right after the child socket is created and right before the request
> sock is released (tcp_check_req() in tcp_minisocks.c)
> 
> For Fast Open the child socket is already created when SYN/ACK was
> sent, the RTT is sampled in tcp_rcv_state_process() after processing
> the final ACK an right before the request socket is released.
> 
> If the SYN/ACK was retransmistted or SYN-cookie was used, we rely
> on TCP timestamps to measure the RTT. The sample is taken at the
> same place in tcp_rcv_state_process() after the timestamp values
> are validated in tcp_validate_incoming(). Note that we do not store
> TS echo value in request_sock for SYN-cookies, because the value
> is already stored in tp->rx_opt used by tcp_ack_update_rtt().
> 
> One side benefit is that the RTT measurement now happens before
> initializing congestion control (of the passive side). Therefore
> the congestion control can use the SYN/ACK RTT.
> 
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

      reply	other threads:[~2015-09-21 23:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 18:36 [PATCH net-next] tcp: usec resolution SYN/ACK RTT Yuchung Cheng
2015-09-21 23:19 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150921.161914.1871041800702197631.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=ycheng@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).