From: Jeff Layton <jlayton@kernel.org>
To: Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>, NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
Chuck Lever <cel@kernel.org>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Jeff Layton <jlayton@kernel.org>
Subject: [PATCH v4 0/4] sunrpc: hardcode pool_mode to pernode, remove other modes
Date: Wed, 01 Jul 2026 15:56:55 -0400 [thread overview]
Message-ID: <20260701-sunrpc-pool-mode-v4-0-b3d867e4c8f9@kernel.org> (raw)
This version drops the 5/4 follow-on patch that I had sent after the
original series, and changes the second patch to not allow unpooled
services to consult the map.
Patches #1 and #3 address what is a shortcoming of the existing code --
namely that the server can be configured to schedule RPCs to pools with
no threads in them.
The first patch addresses this problem: if the chosen pool has no
threads, then choose another that does.
The third patch tries to prevent this situation in the
auto-thread-placement case by ensuring that each populated node has at
least one thread.
The last patch is a performance micro-optimization. The old code used a
modulus (actually two) to determine the pool (and prevent potentially
overrunning the array). This trades that for a less cpu-intensive method
of finding the pool to use.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Changes in v4:
- Drop 5/4 RCU patch
- Only let pooled services consult the map
- Comment and commit log fixes
- Link to v3: https://lore.kernel.org/r/20260629-sunrpc-pool-mode-v3-0-d92676606dfd@kernel.org
Changes in v3:
- Add patch to ensure that we don't route requests to empty pools
- When auto-distributing threads, always create at least one thread per populated pool
- Use sysfs_match_string for the module parameter
- Reword deprecation printk to be more vague about removal
- Explicitly set m_count == 0 in svc_pool_map_get()
- Optimize svc_pool_for_cpu() by eliminating modulus ops
- Link to v2: https://lore.kernel.org/r/20260625-sunrpc-pool-mode-v2-1-4f512b6e1ee8@kernel.org
Changes in v2:
- Accept any previously-accepted setting for pool_mode
- Link to v1: https://lore.kernel.org/r/20260423-sunrpc-pool-mode-v1-1-b7f20e35749b@kernel.org
---
Jeff Layton (4):
sunrpc: route to a populated pool in svc_pool_for_cpu()
sunrpc: hardcode pool_mode to pernode, remove other modes
sunrpc: guarantee a thread per CPU-bearing node when auto-distributing
sunrpc: eliminate a modulus operation from the enqueueing codepath
Documentation/admin-guide/kernel-parameters.txt | 20 +-
net/sunrpc/svc.c | 302 ++++++++----------------
2 files changed, 104 insertions(+), 218 deletions(-)
---
base-commit: f8eb95335cc219493427f976460cf4b7e9641e92
change-id: 20260423-sunrpc-pool-mode-3e6b56320dc4
Best regards,
--
Jeff Layton <jlayton@kernel.org>
next reply other threads:[~2026-07-01 19:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 19:56 Jeff Layton [this message]
2026-07-01 19:56 ` [PATCH v4 1/4] sunrpc: route to a populated pool in svc_pool_for_cpu() Jeff Layton
2026-07-01 22:13 ` NeilBrown
2026-07-02 12:17 ` Jeff Layton
2026-07-02 12:31 ` Jeff Layton
2026-07-03 3:42 ` NeilBrown
2026-07-06 11:49 ` Jeff Layton
2026-07-01 19:56 ` [PATCH v4 2/4] sunrpc: hardcode pool_mode to pernode, remove other modes Jeff Layton
2026-07-01 22:31 ` NeilBrown
2026-07-02 12:46 ` Jeff Layton
2026-07-03 4:02 ` NeilBrown
2026-07-01 19:56 ` [PATCH v4 3/4] sunrpc: guarantee a thread per CPU-bearing node when auto-distributing Jeff Layton
2026-07-01 22:37 ` NeilBrown
2026-07-02 13:05 ` Jeff Layton
2026-07-01 19:56 ` [PATCH v4 4/4] sunrpc: eliminate a modulus operation from the enqueueing codepath Jeff Layton
2026-07-01 22:38 ` NeilBrown
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=20260701-sunrpc-pool-mode-v4-0-b3d867e4c8f9@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=cel@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
--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