summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2025-10-30 13:31:45 +0100
committerPaolo Abeni <pabeni@redhat.com>2025-10-30 13:31:46 +0100
commit7ea7694495db8ec2e80b601f967865263b44b16a (patch)
tree5bb6587dbe595fd8c494eff0d7b4a22b2b4f7c7e /net/ipv4/tcp_input.c
parentea7d0d60ebc9bddf3ad768557dfa1495bc032bf6 (diff)
parent8f736087e52f1cd4234b871c137f5a3eb0d2741a (diff)
Merge branch 'net-smc-make-wr-buffer-count-configurable'
Halil Pasic says: ==================== net/smc: make wr buffer count configurable The current value of SMC_WR_BUF_CNT is 16 which leads to heavy contention on the wr_tx_wait workqueue of the SMC-R linkgroup and its spinlock when many connections are competing for the work request buffers. Currently up to 256 connections per linkgroup are supported. To make things worse when finally a buffer becomes available and smc_wr_tx_put_slot() signals the linkgroup's wr_tx_wait wq, because WQ_FLAG_EXCLUSIVE is not used all the waiters get woken up, most of the time a single one can proceed, and the rest is contending on the spinlock of the wq to go to sleep again. Addressing this by simply bumping SMC_WR_BUF_CNT to 256 was deemed risky, because the large-ish physically continuous allocation could fail and lead to TCP fall-backs. For reference see this discussion thread on "[PATCH net-next] net/smc: increase SMC_WR_BUF_CNT" (in archive https://lists.openwall.net/netdev/2024/11/05/186), which concludes with the agreement to try to come up with something smarter, which is what this series aims for. Additionally if for some reason it is known that heavy contention is not to be expected going with something like 256 work request buffers is wasteful. To address these concerns make the number of work requests configurable, and introduce a back-off logic with handles -ENOMEM form smc_wr_alloc_link_mem() gracefully. v5: https://lore.kernel.org/netdev/20250929000001.1752206-1-pasic@linux.ibm.com/ v4: https://lore.kernel.org/netdev/20250927232144.3478161-1-pasic@linux.ibm.com/ v3: https://lore.kernel.org/netdev/20250921214440.325325-1-pasic@linux.ibm.com/ v2: https://lore.kernel.org/netdev/20250908220150.3329433-1-pasic@linux.ibm.com/ v1: https://lore.kernel.org/all/20250904211254.1057445-1-pasic@linux.ibm.com/ ==================== Link: https://patch.msgid.link/20251027224856.2970019-1-pasic@linux.ibm.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/ipv4/tcp_input.c')
0 files changed, 0 insertions, 0 deletions