net/smc: make wr buffer count configurable
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest2 patches 2 repliesApplied 2/2
- v52 patches 9 repliesSuperseded
- v42 patches 1 replySuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 2 patches | 18 replies | Superseded | |
| v2 | 2 patches | 6 replies | Superseded | |
| v1 | 2 patches | 7 replies | Superseded |
Changes in v6 from the cover letter
* Added r-b's by Dust Li
* Replaced "So called" with "So-called" (Bagas)
v5: https://lore.kernel.org/netdev/[email protected]/
v4: https://lore.kernel.org/netdev/[email protected]/
v3: https://lore.kernel.org/netdev/[email protected]/
v2: https://lore.kernel.org/netdev/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/
Patches in v6 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | net/smc: make wr buffer count configurableDocumentation/ include/ net/ +6 more | +91 | 1 reply | Applied |
| 2/2 | net/smc: handle -ENOMEM from smc_wr_alloc_link_mem gracefullyDocumentation/ net/ net/ +1 more | +46 | 1 reply | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Sidraya Jayagond | Dust Li | Wenjia Zhang | Mahanta Jambigi |
|---|---|---|---|---|
| 1/2 | R-b | R-b | T-b | |
| 2/2 | R-b | R-b | R-b | R-b T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH net-next v6 0/2] 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.
---
Changelog:
---------
v6:
* Added r-b's by Dust Li
* Replaced "So called" with "So-called" (Bagas)
v5: https://lore.kernel.org/netdev/[email protected]/
v4: https://lore.kernel.org/netdev/[email protected]/
v3: https://lore.kernel.org/netdev/[email protected]/
v2: https://lore.kernel.org/netdev/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/
Halil Pasic (2):
net/smc: make wr buffer count configurable
net/smc: handle -ENOMEM from smc_wr_alloc_link_mem gracefully
Documentation/networking/smc-sysctl.rst | 40 +++++++++++++++++++++++++ include/net/netns/smc.h | 2 ++ net/smc/smc_core.c | 34 ++++++++++++++------- net/smc/smc_core.h | 8 +++++ net/smc/smc_ib.c | 10 +++---- net/smc/smc_llc.c | 2 ++ net/smc/smc_sysctl.c | 22 ++++++++++++++ net/smc/smc_sysctl.h | 2 ++ net/smc/smc_wr.c | 31 +++++++++---------- net/smc/smc_wr.h | 2 -- 10 files changed, 121 insertions(+), 32 deletions(-)
base-commit: bfe62db5422b1a5f25752bd0877a097d436d876d
Signature · 1 line
2.48.1