[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230802093313.1501605-1-gbayer@linux.ibm.com>
Date: Wed, 2 Aug 2023 11:33:11 +0200
From: Gerd Bayer <gbayer@...ux.ibm.com>
To: Wenjia Zhang <wenjia@...ux.ibm.com>, Jan Karcher <jaka@...ux.ibm.com>,
Tony Lu <tonylu@...ux.alibaba.com>, Paolo Abeni <pabeni@...hat.com>
Cc: Karsten Graul <kgraul@...ux.ibm.com>,
"D . Wythe" <alibuda@...ux.alibaba.com>,
Wen Gu <guwen@...ux.alibaba.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
linux-s390@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH net 0/2] net/smc: Fix effective buffer size
Hi all,
commit 0227f058aa29 ("net/smc: Unbind r/w buffer size from clcsock
and make them tunable") started to derive the effective buffer size for
SMC connections inconsistently in case a TCP fallback was used and
memory consumption of SMC with the default settings was doubled when
a connection negotiated SMC. That was not what we want.
This series consolidates the resulting effective buffer size that is
used with SMC sockets, which is based on Jan karcher's effort (see
[1]). For all TCP exchanges (in particular in case of a fall back when
no SMC connection was possible) the values from net.ipv4.tcp_[rw]mem
are used. If SMC succeeds in establishing a SMC connection, the newly
introduced values from net.smc.[rw]mem are used.
net.smc.[rw]mem is initialized to 64kB, respectively. Internal test
have show this to be a good compromise between throughput/latency
and memory consumption. Also net.smc.[rw]mem is now decoupled completely
from any tuning through net.ipv4.tcp_[rw]mem.
If a user chose to tune a socket's receive or send buffer size with
setsockopt, this tuning is now consistently applied to either fall-back
TCP or proper SMC connections over the socket.
Thanks,
Gerd
[1] https://lore.kernel.org/netdev/20221123104907.14624-1-jaka@linux.ibm.com
Gerd Bayer (2):
net/smc: Fix setsockopt and sysctl to specify same buffer size again
net/smc: Use correct buffer sizes when switching between TCP and SMC
net/smc/af_smc.c | 80 +++++++++++++++++++++++++++++++-------------
net/smc/smc.h | 2 +-
net/smc/smc_clc.c | 4 +--
net/smc/smc_core.c | 25 +++++++-------
net/smc/smc_sysctl.c | 10 ++++--
5 files changed, 79 insertions(+), 42 deletions(-)
--
2.41.0
Powered by blists - more mailing lists