]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net/smc: correct settings of RMB window update limit
authorDust Li <dust.li@linux.alibaba.com>
Tue, 1 Mar 2022 09:44:00 +0000 (17:44 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:40:46 +0000 (14:40 +0200)
commit044304181fbeac4c1c90ae56f7908170d2f66098
tree6ba795b4c43151d2a7492411b7e8e57cfc6eda64
parent68f0d9380fa09f1aac96a976230f9f4861ade25f
net/smc: correct settings of RMB window update limit

BugLink: https://bugs.launchpad.net/bugs/1969107
[ Upstream commit 6bf536eb5c8ca011d1ff57b5c5f7c57ceac06a37 ]

rmbe_update_limit is used to limit announcing receive
window updating too frequently. RFC7609 request a minimal
increase in the window size of 10% of the receive buffer
space. But current implementation used:

  min_t(int, rmbe_size / 10, SOCK_MIN_SNDBUF / 2)

and SOCK_MIN_SNDBUF / 2 == 2304 Bytes, which is almost
always less then 10% of the receive buffer space.

This causes the receiver always sending CDC message to
update its consumer cursor when it consumes more then 2K
of data. And as a result, we may encounter something like
"TCP silly window syndrome" when sending 2.5~8K message.

This patch fixes this using max(rmbe_size / 10, SOCK_MIN_SNDBUF / 2).

With this patch and SMC autocorking enabled, qperf 2K/4K/8K
tcp_bw test shows 45%/75%/40% increase in throughput respectively.

Signed-off-by: Dust Li <dust.li@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 58758110912d244f9acb80a3e6ffe1dd9c4d9070)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/smc/smc_core.c