[PATCH RFC 8/8] SUNRPC: Reduce xprtiod workqueue contention
From: Chuck Lever
Date: Mon Aug 31 2026 - 15:19:07 EST
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@xxxxxxxxxx>
Signed-off-by: Chuck Lever <cel@xxxxxxxxxx>
---
net/sunrpc/sched.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index b84af2c0b104..3236dfdb4096 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -1304,6 +1304,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