[PATCH net-next 0/2] net/smc: transition to RDMA core CQ pooling

D. Wythe posted 2 patches 1 week, 4 days ago
There is a newer version of this series
net/smc/smc_core.c |   9 +-
net/smc/smc_core.h |  28 ++--
net/smc/smc_ib.c   | 113 +++++----------
net/smc/smc_ib.h   |   7 -
net/smc/smc_tx.c   |   1 -
net/smc/smc_wr.c   | 344 ++++++++++++++++++++-------------------------
net/smc/smc_wr.h   |  40 ++----
7 files changed, 215 insertions(+), 327 deletions(-)
[PATCH net-next 0/2] net/smc: transition to RDMA core CQ pooling
Posted by D. Wythe 1 week, 4 days ago
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.

As a side effect, the increased concurrency can amplify contention for TX
slots on the shared wait queue. Patch 2 addresses this by switching TX slot
allocation from non-exclusive wait_event() to prepare_to_wait_exclusive(),
which avoids thundering-herd wakeups under contention.

Patch 1 replaces the global per-device CQ and manual tasklet polling model
with RDMA core CQ pooling.
Patch 2 reduces TX slot contention by using exclusive wait queue entries
during allocation.

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.

D. Wythe (2):
  net/smc: transition to RDMA core CQ pooling
  net/smc: reduce TX slot contention with exclusive wait

 net/smc/smc_core.c |   9 +-
 net/smc/smc_core.h |  28 ++--
 net/smc/smc_ib.c   | 113 +++++----------
 net/smc/smc_ib.h   |   7 -
 net/smc/smc_tx.c   |   1 -
 net/smc/smc_wr.c   | 344 ++++++++++++++++++++-------------------------
 net/smc/smc_wr.h   |  40 ++----
 7 files changed, 215 insertions(+), 327 deletions(-)

-- 
2.45.0
Re: [PATCH net-next 0/2] net/smc: transition to RDMA core CQ pooling
Posted by Jakub Kicinski 5 days, 17 hours ago
On Thu, 28 May 2026 16:48:17 +0800 D. Wythe wrote:
> 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.
> 
> As a side effect, the increased concurrency can amplify contention for TX
> slots on the shared wait queue. Patch 2 addresses this by switching TX slot
> allocation from non-exclusive wait_event() to prepare_to_wait_exclusive(),
> which avoids thundering-herd wakeups under contention.
> 
> Patch 1 replaces the global per-device CQ and manual tasklet polling model
> with RDMA core CQ pooling.
> Patch 2 reduces TX slot contention by using exclusive wait queue entries
> during allocation.

Sashiko reports a couple of issues on patch 1:
https://sashiko.dev/#/patchset/20260528084819.6059-2-alibuda@linux.alibaba.com
Are these legit?

Either way - would be good to get some reviews here from (ohter) SMC
maintainers.
Re: [PATCH net-next 0/2] net/smc: transition to RDMA core CQ pooling
Posted by D. Wythe 3 days, 11 hours ago
On Tue, Jun 02, 2026 at 02:03:59PM -0700, Jakub Kicinski wrote:
> On Thu, 28 May 2026 16:48:17 +0800 D. Wythe wrote:
> > 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.
> > 
> > As a side effect, the increased concurrency can amplify contention for TX
> > slots on the shared wait queue. Patch 2 addresses this by switching TX slot
> > allocation from non-exclusive wait_event() to prepare_to_wait_exclusive(),
> > which avoids thundering-herd wakeups under contention.
> > 
> > Patch 1 replaces the global per-device CQ and manual tasklet polling model
> > with RDMA core CQ pooling.
> > Patch 2 reduces TX slot contention by using exclusive wait queue entries
> > during allocation.
> 
> Sashiko reports a couple of issues on patch 1:
> https://sashiko.dev/#/patchset/20260528084819.6059-2-alibuda@linux.alibaba.com
> Are these legit?
> 
> Either way - would be good to get some reviews here from (ohter) SMC
> maintainers.

Thanks for the heads up. 

We’ve seen the Sashiko reports and are currently evaluating whether
they’re legit. So far it looks valid, though some of the issues may be
uncovering pre-existing problems. If needed, we may send extra patches
to fix them before applying this patch. The SMC maintainers are already
aware, and I expect more maintainers to join the review soon.

D. Wythe