From: Mahanta Jambigi <mjambigi@linux.ibm.com>
To: "D. Wythe" <alibuda@linux.alibaba.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: Re: [PATCH net-next v2 2/2] net/smc: reduce TX slot contention with exclusive wait
Date: Mon, 24 Aug 2026 14:02:01 +0530 [thread overview]
Message-ID: <758a944c-c26f-4509-a898-d93f345c19ca@linux.ibm.com> (raw)
In-Reply-To: <20260821091702.21458-3-alibuda@linux.alibaba.com>
On 21/08/26 2:47 pm, D. Wythe wrote:
> smc_wr_tx_get_free_slot() waits for a free TX slot with
> wait_event_interruptible_timeout(). Since the wait_event family
> enqueues waiters as non-exclusive, wake_up() may wake multiple
> waiters even though only one can use the slot, causing
> thundering-herd contention when slots are scarce.
>
> Use an exclusive wait loop with prepare_to_wait_exclusive() so
> wake_up() wakes only one waiter per freed slot.
> smc_wr_wakeup_tx_wait() still uses wake_up_all() during link
> teardown, so teardown behavior is unchanged.
>
> This also corrects the return value on a pending signal: the previous
> wait_event_interruptible_timeout() path fell through to the "no free
> slot" case and returned -EPIPE, masking the signal as a connection
> error. The open-coded loop now returns -ERESTARTSYS, matching the
> standard interruptible-wait semantics and letting the syscall restart
> machinery handle it.
>
> Performance
> ===========
>
> Measured with uperf between two peers over SMC-R. The benefit depends
> on how often the TX slot wait path is actually taken.
>
> With the default settings, where many connections share a link group
> and the send queue is small, slots are scarce and the wait path is hot:
>
> net.smc.smcr_max_conns_per_lgr = 255
> net.smc.smcr_max_send_wr = 16
> net.smc.smcr_max_recv_wr = 48
>
> workload baseline patched delta
> ---------------------------------------------------------
> rr1c-200x1000-50.xml 655.06 Mb/s 1.53 Gb/s +134%
> rr1c-1x1-250.xml 371.03 Kb/s 2.07 Mb/s +458%
Overall, I am also seeing significant performance improvements with this
patch, ranging from approximately 20% to over 150% across several
workloads. Do we expect to see further improvements once the CQ pooling
patch is applied?
> Signed-off-by: D. Wythe <alibuda@linux.alibaba.com>
> Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
Reviewed-by: Mahanta Jambigi <mjambigi@linux.ibm.com>
next prev parent reply other threads:[~2026-08-24 8:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 9:17 [PATCH net-next v2 0/2] net/smc: fix v2 slot clearing and reduce TX slot contention D. Wythe
2026-08-21 9:17 ` [PATCH net-next v2 1/2] net/smc: clear the correct v2 slot and buffer in smc_wr_tx_put_slot() D. Wythe
2026-08-22 9:17 ` sashiko-bot
2026-08-21 9:17 ` [PATCH net-next v2 2/2] net/smc: reduce TX slot contention with exclusive wait D. Wythe
2026-08-22 9:17 ` sashiko-bot
2026-08-24 8:32 ` Mahanta Jambigi [this message]
2026-08-24 17:44 ` [PATCH net-next v2 0/2] net/smc: fix v2 slot clearing and reduce TX slot contention Jakub Kicinski
-- strict thread matches above, loose matches on Subject: below --
2026-05-28 8:48 [PATCH net-next 0/2] net/smc: transition to RDMA core CQ pooling D. Wythe
2026-05-28 8:48 ` [PATCH net-next v2 2/2] net/smc: reduce TX slot contention with exclusive wait D. Wythe
2026-06-08 14:04 ` Dust Li
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=758a944c-c26f-4509-a898-d93f345c19ca@linux.ibm.com \
--to=mjambigi@linux.ibm.com \
--cc=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=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.