netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: kuba@kernel.org, netdev@vger.kernel.org, edumazet@google.com,
	soheil@google.com, ncardwell@google.com, ycheng@google.com,
	abuehaze@amazon.com
Subject: Re: [PATCH net] tcp: select sane initial rcvq_space.space for big MSS
Date: Tue, 08 Dec 2020 16:28:52 -0800 (PST)	[thread overview]
Message-ID: <20201208.162852.2205708169665484487.davem@davemloft.net> (raw)
In-Reply-To: <20201208162131.313635-1-eric.dumazet@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue,  8 Dec 2020 08:21:31 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> Before commit a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB")
> small tcp_rmem[1] values were overridden by tcp_fixup_rcvbuf() to accommodate various MSS.
> 
> This is no longer the case, and Hazem Mohamed Abuelfotoh reported
> that DRS would not work for MTU 9000 endpoints receiving regular (1500 bytes) frames.
> 
> Root cause is that tcp_init_buffer_space() uses tp->rcv_wnd for upper limit
> of rcvq_space.space computation, while it can select later a smaller
> value for tp->rcv_ssthresh and tp->window_clamp.
> 
> ss -temoi on receiver would show :
> 
> skmem:(r0,rb131072,t0,tb46080,f0,w0,o0,bl0,d0) rcv_space:62496 rcv_ssthresh:56596
> 
> This means that TCP can not increase its window in tcp_grow_window(),
> and that DRS can never kick.
> 
> Fix this by making sure that rcvq_space.space is not bigger than number of bytes
> that can be held in TCP receive queue.
> 
> People unable/unwilling to change their kernel can work around this issue by
> selecting a bigger tcp_rmem[1] value as in :
> 
> echo "4096 196608 6291456" >/proc/sys/net/ipv4/tcp_rmem
> 
> Based on an initial report and patch from Hazem Mohamed Abuelfotoh
>  https://lore.kernel.org/netdev/20201204180622.14285-1-abuehaze@amazon.com/
> 
> Fixes: a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB")
> Fixes: 041a14d26715 ("tcp: start receiver buffer autotuning sooner")
> Reported-by: Hazem Mohamed Abuelfotoh <abuehaze@amazon.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, thanks Eric.

  parent reply	other threads:[~2020-12-09  0:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 16:21 [PATCH net] tcp: select sane initial rcvq_space.space for big MSS Eric Dumazet
2020-12-08 20:45 ` Soheil Hassas Yeganeh
2020-12-09  0:28 ` David Miller [this message]
2020-12-10 12:49   ` Mohamed Abuelfotoh, Hazem
2020-12-10 13:34     ` Eric Dumazet

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=20201208.162852.2205708169665484487.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=abuehaze@amazon.com \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kuba@kernel.org \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=soheil@google.com \
    --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).