diff options
| author | Dust Li <dust.li@linux.alibaba.com> | 2022-03-01 17:44:00 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-15 14:18:34 +0200 |
| commit | 1dd7569b8c707af787872c893dcd948d2d1d8fb2 (patch) | |
| tree | 922e0f4e998d25d2e63d4720ae303ef6415ab5e5 /net | |
| parent | 2fda284a3acbcc44bdfb5c39860fee6a92107525 (diff) | |
| download | linux-1dd7569b8c707af787872c893dcd948d2d1d8fb2.tar.gz linux-1dd7569b8c707af787872c893dcd948d2d1d8fb2.tar.bz2 linux-1dd7569b8c707af787872c893dcd948d2d1d8fb2.zip | |
net/smc: correct settings of RMB window update limit
[ 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>
Diffstat (limited to 'net')
| -rw-r--r-- | net/smc/smc_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index 12672019f76c..66cdfd5725ac 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -734,7 +734,7 @@ static struct smc_buf_desc *smc_buf_get_slot(int compressed_bufsize, */ static inline int smc_rmb_wnd_update_limit(int rmbe_size) { - return min_t(int, rmbe_size / 10, SOCK_MIN_SNDBUF / 2); + return max_t(int, rmbe_size / 10, SOCK_MIN_SNDBUF / 2); } static struct smc_buf_desc *smcr_new_buf_create(struct smc_link_group *lgr, |
