[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200512.125020.1577259938371953992.davem@davemloft.net>
Date: Tue, 12 May 2020 12:50:20 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: edumazet@...gle.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net] tcp: fix SO_RCVLOWAT hangs with fat skbs
From: Eric Dumazet <edumazet@...gle.com>
Date: Tue, 12 May 2020 06:54:30 -0700
> We autotune rcvbuf whenever SO_RCVLOWAT is set to account for 100%
> overhead in tcp_set_rcvlowat()
>
> This works well when skb->len/skb->truesize ratio is bigger than 0.5
>
> But if we receive packets with small MSS, we can end up in a situation
> where not enough bytes are available in the receive queue to satisfy
> RCVLOWAT setting.
> As our sk_rcvbuf limit is hit, we send zero windows in ACK packets,
> preventing remote peer from sending more data.
>
> Even autotuning does not help, because it only triggers at the time
> user process drains the queue. If no EPOLLIN is generated, this
> can not happen.
>
> Note poll() has a similar issue, after commit
> c7004482e8dc ("tcp: Respect SO_RCVLOWAT in tcp_poll().")
>
> Fixes: 03f45c883c6f ("tcp: avoid extra wakeups for SO_RCVLOWAT users")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Applied and queued up for -stable, thanks Eric.
Powered by blists - more mailing lists