From: Allison Henderson <achender@kernel.org>
To: netdev@vger.kernel.org
Cc: pabeni@redhat.com, edumazet@google.com, rds-devel@oss.oracle.com,
kuba@kernel.org, horms@kernel.org, linux-rdma@vger.kernel.org,
allison.henderson@oracle.com
Subject: [PATCH net-next v1 1/3] net/rds: Change return code from rds_send_xmit() when lock is taken
Date: Sat, 17 Jan 2026 19:49:09 -0700 [thread overview]
Message-ID: <20260118024911.1203224-2-achender@kernel.org> (raw)
In-Reply-To: <20260118024911.1203224-1-achender@kernel.org>
From: Håkon Bugge <haakon.bugge@oracle.com>
Change the return code from rds_send_xmit() when it is unable to
acquire the RDS_IN_XMIT lock-bit from -ENOMEM to -EBUSY. This to
avoid re-queuing of the rds_send_worker() when someone else is
actually executing rds_send_xmit().
Performance is improved by 2% running rds-stress with the following
parameters: "-t 16 -d 32 -q 64 -a 64 -o". The test was run five times,
each time running for one minute, and the arithmetic average of the tx
IOPS was used as performance metric.
Send lock contention was reduced by 6.5% and the ib_tx_ring_full
condition was more than doubled, indicating better ability to send.
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
---
net/rds/send.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/rds/send.c b/net/rds/send.c
index 3e3d028bc21e..747e348f48ba 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -158,7 +158,7 @@ int rds_send_xmit(struct rds_conn_path *cp)
*/
if (!acquire_in_xmit(cp)) {
rds_stats_inc(s_send_lock_contention);
- ret = -ENOMEM;
+ ret = -EBUSY;
goto out;
}
@@ -1375,7 +1375,7 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
rds_stats_inc(s_send_queued);
ret = rds_send_xmit(cpath);
- if (ret == -ENOMEM || ret == -EAGAIN) {
+ if (ret == -ENOMEM || ret == -EAGAIN || ret == -EBUSY) {
ret = 0;
rcu_read_lock();
if (rds_destroy_pending(cpath->cp_conn))
--
2.43.0
next prev parent reply other threads:[~2026-01-18 2:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-18 2:49 [PATCH net-next v1 0/3] net/rds: RDS-TCP bug fix collection, subset 2: lock contention, state machine bugs, message drops Allison Henderson
2026-01-18 2:49 ` Allison Henderson [this message]
2026-01-18 2:49 ` [PATCH net-next v1 2/3] net/rds: No shortcut out of RDS_CONN_ERROR Allison Henderson
2026-01-18 2:49 ` [PATCH net-next v1 3/3] net/rds: rds_tcp_accept_one ought to not discard messages Allison Henderson
2026-01-21 3:09 ` [PATCH net-next v1 0/3] net/rds: RDS-TCP bug fix collection, subset 2: lock contention, state machine bugs, message drops Jakub Kicinski
2026-01-21 17:50 ` Allison Henderson
2026-01-22 1:39 ` Jakub Kicinski
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=20260118024911.1203224-2-achender@kernel.org \
--to=achender@kernel.org \
--cc=allison.henderson@oracle.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rds-devel@oss.oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox