From: "D. Wythe" <alibuda@linux.alibaba.com>
To: mjambigi@linux.ibm.com, wenjia@linux.ibm.com,
wintera@linux.ibm.com, dust.li@linux.alibaba.com,
tonylu@linux.alibaba.com, guwen@linux.alibaba.com
Cc: kuba@kernel.org, davem@davemloft.net, netdev@vger.kernel.org,
linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
leonro@nvidia.com, pabeni@redhat.com, edumazet@google.com,
sidraya@linux.ibm.com, jaka@linux.ibm.com,
oliver.yang@linux.alibaba.com
Subject: [PATCH net-next v4 0/3] net/smc: transition to RDMA core CQ pooling
Date: Thu, 16 Jul 2026 19:37:42 +0800 [thread overview]
Message-ID: <20260716113745.65234-1-alibuda@linux.alibaba.com> (raw)
This series transitions SMC-R completion handling to RDMA core CQ pooling
via the ib_cqe API. The new completion model improves scalability by
allowing per-link completion processing across multiple cores and enables
DIM-based interrupt moderation.
The increased concurrency can amplify contention for TX slots on the shared
wait queue, so the exclusive-wait change comes first as a standalone
improvement that the CQ pooling teardown then builds on.
Patch 1 fixes smc_wr_tx_put_slot() to clear the v2 pending slot and buffer
structures instead of the pointer variables.
Patch 2 reduces TX slot contention by switching TX slot allocation from
non-exclusive wait_event() to prepare_to_wait_exclusive().
Patch 3 replaces the global per-device CQ and manual tasklet polling model
with RDMA core CQ pooling.
Link: https://lore.kernel.org/netdev/20260305022323.96125-1-alibuda@linux.alibaba.com/
---
Changes v1 -> v2:
https://lore.kernel.org/netdev/20260508063718.101622-1-alibuda@linux.alibaba.com/
1. remove unnecessary inline from static CQE init helpers.
2. Use ib_drain_qp() with +1 max_send_wr;
3. Fix v2 state clearing.
4. Add re-check after schedule_timeout() to fix timeout/signal races.
Changes v2 -> v3:
https://lore.kernel.org/netdev/20260528084819.6059-1-alibuda@linux.alibaba.com/
1. Reserve +3 instead of +1 for the SQ to cover the drain, FastReg and
SMC-Rv2 SEND WRs, avoiding SQ exhaustion that breaks ib_drain_sq().
2. Guard the recv WR repost with a per-link percpu_ref so no WR is
reposted after ib_drain_qp(), fixing the RX repost/drain use-after-free.
3. Split the smc_wr_tx_put_slot() v2 clearing fix into a separate patch
(1/3) with a Fixes: tag and reworded to the verifiable root cause.
Changes v3 -> v4:
https://lore.kernel.org/netdev/20260710033356.16460-1-alibuda@linux.alibaba.com/
1. Reorder: move the exclusive-wait patch before the CQ pooling patch.
2. Fix teardown stall: reintroduce smc_ib_modify_qp_error() and flush the QP
in smc_wr_stop_link() before waiting for the refs.
3. smc_wr_reg_send(): take the ref before ib_post_send().
4. smc_wr_tx_process_cqe(): wake_up_all() on a flush completion.
5. Merge the three per-link percpu_refs into a single wr_refs.
D. Wythe (3):
net/smc: clear the correct v2 slot and buffer in smc_wr_tx_put_slot()
net/smc: reduce TX slot contention with exclusive wait
net/smc: transition to RDMA core CQ pooling
net/smc/smc_core.c | 10 +-
net/smc/smc_core.h | 36 ++--
net/smc/smc_ib.c | 106 ++++-------
net/smc/smc_ib.h | 6 -
net/smc/smc_tx.c | 1 -
net/smc/smc_wr.c | 445 +++++++++++++++++++++------------------------
net/smc/smc_wr.h | 50 ++---
7 files changed, 287 insertions(+), 367 deletions(-)
--
2.45.0
next reply other threads:[~2026-07-16 11:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 11:37 D. Wythe [this message]
2026-07-16 11:37 ` [PATCH net-next v4 1/3] net/smc: clear the correct v2 slot and buffer in smc_wr_tx_put_slot() D. Wythe
2026-07-17 11:38 ` sashiko-bot
2026-07-22 7:12 ` Mahanta Jambigi
2026-07-16 11:37 ` [PATCH net-next v4 2/3] net/smc: reduce TX slot contention with exclusive wait D. Wythe
2026-07-23 3:14 ` Wen Gu
2026-07-16 11:37 ` [PATCH net-next v4 3/3] net/smc: transition to RDMA core CQ pooling D. Wythe
2026-07-22 11:47 ` Mahanta Jambigi
2026-07-30 4:47 ` Mahanta Jambigi
2026-07-30 5:43 ` D. Wythe
2026-07-30 7:25 ` Mahanta Jambigi
2026-07-23 2:56 ` Wen Gu
2026-07-30 3:22 ` D. Wythe
2026-07-22 0:53 ` [PATCH net-next v4 0/3] " Jakub Kicinski
2026-07-22 7:06 ` Mahanta Jambigi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260716113745.65234-1-alibuda@linux.alibaba.com \
--to=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=jaka@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjambigi@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=oliver.yang@linux.alibaba.com \
--cc=pabeni@redhat.com \
--cc=sidraya@linux.ibm.com \
--cc=tonylu@linux.alibaba.com \
--cc=wenjia@linux.ibm.com \
--cc=wintera@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.