mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Lever <cel@kernel.org>
To: Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>,  Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>,
	linux-nfs@vger.kernel.org,
	 open list <linux-kernel@vger.kernel.org>,
	Chuck Lever <cel@kernel.org>
Subject: [PATCH RFC v2 8/8] SUNRPC: Reduce xprtiod workqueue contention
Date: Wed, 02 Sep 2026 15:28:53 -0400	[thread overview]
Message-ID: <20260902-performance-v2-8-b71c0c082f9d@kernel.org> (raw)
In-Reply-To: <20260902-performance-v2-0-b71c0c082f9d@kernel.org>

xprtiod handles transport-level operations: socket receive
processing, error recovery, and connection lifecycle. On systems
driving heavy NFS traffic, these operations contend on the UNBOUND
worker pool lock just as rpciod does.

Set WQ_AFFN_SMT on the xprtiod workqueue to give each SMT group its
own pool and lock.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Chuck Lever <cel@kernel.org>
---
 net/sunrpc/sched.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 2a1938b9e41e..e678326e6b0d 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -1298,6 +1298,7 @@ static int rpciod_start(void)
 	wq = alloc_workqueue("xprtiod", wq_flags, 0);
 	if (!wq)
 		goto free_rpciod;
+	rpc_set_wq_smt_affinity(wq, "xprtiod");
 	xprtiod_workqueue = wq;
 	return 1;
 free_rpciod:

-- 
2.55.0


      parent reply	other threads:[~2026-09-02 19:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 19:28 [PATCH RFC v2 0/8] Reduce lock contention in the NFS client Chuck Lever
2026-09-02 19:28 ` [PATCH RFC v2 1/8] SUNRPC: Use atomic_t for XID allocation Chuck Lever
2026-09-02 19:28 ` [PATCH RFC v2 2/8] SUNRPC: Split recv_lock out of xprt->queue_lock Chuck Lever
2026-09-02 19:28 ` [PATCH RFC v2 3/8] SUNRPC: Set WQ_SYSFS on rpciod and xprtiod Chuck Lever
2026-09-02 19:28 ` [PATCH RFC v2 4/8] NFS: Set WQ_SYSFS on nfsiod Chuck Lever
2026-09-02 19:28 ` [PATCH RFC v2 5/8] workqueue: add workqueue_set_affn_scope() Chuck Lever
2026-09-02 19:36   ` Tejun Heo
2026-09-03 13:41     ` Chuck Lever
2026-09-02 19:28 ` [PATCH RFC v2 6/8] SUNRPC: Reduce rpciod workqueue contention Chuck Lever
2026-09-02 19:28 ` [PATCH RFC v2 7/8] NFS: Reduce nfsiod " Chuck Lever
2026-09-02 19:28 ` Chuck Lever [this message]

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=20260902-performance-v2-8-b71c0c082f9d@kernel.org \
    --to=cel@kernel.org \
    --cc=anna@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=trondmy@kernel.org \
    /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

all inboxes | Powered by JetHome®