Linux NFS development
 help / color / mirror / Atom feed
* [PATCH v5 0/5] sunrpc: hardcode pool_mode to pernode, remove other modes
@ 2026-07-06 13:29 Jeff Layton
  2026-07-06 13:29 ` [PATCH v5 1/5] sunrpc: route to a populated pool in svc_pool_for_cpu() Jeff Layton
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Jeff Layton @ 2026-07-06 13:29 UTC (permalink / raw)
  To: Trond Myklebust, Anna Schumaker, NeilBrown, Olga Kornievskaia,
	Dai Ngo, Tom Talpey, Chuck Lever
  Cc: linux-nfs, linux-kernel, Jeff Layton, NeilBrown

This has a few small fixes and comment cleanups and also implements
Neil's suggestion to remove serv.sv_nrpools:

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 two patches implement Neil's suggestion to eliminate
serv.sv_nrpools. This has the side effect of getting the modulus out of
the svc_pool_for_cpu() hotpath as well.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Changes in v5:
- Expand patch to eliminate modulus to also eliminate serv.sv_nrpools field
- Revised comments in svc_pool_for_cpu()
- Link to v4: https://lore.kernel.org/r/20260701-sunrpc-pool-mode-v4-0-b3d867e4c8f9@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 (5):
      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 pool when auto-distributing
      sunrpc: tear down pool counters before dropping the pool map reference
      sunrpc: derive the pool count instead of caching it in sv_nrpools

 Documentation/admin-guide/kernel-parameters.txt |  20 +-
 fs/nfsd/nfsctl.c                                |   2 +-
 fs/nfsd/nfssvc.c                                |  10 +-
 include/linux/sunrpc/svc.h                      |   2 +-
 net/sunrpc/svc.c                                | 355 +++++++++---------------
 net/sunrpc/svc_xprt.c                           |   6 +-
 6 files changed, 152 insertions(+), 243 deletions(-)
---
base-commit: ee6ae4a6bf3565b880dfb420017337475dfbc9ea
change-id: 20260423-sunrpc-pool-mode-3e6b56320dc4

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-07-06 22:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 13:29 [PATCH v5 0/5] sunrpc: hardcode pool_mode to pernode, remove other modes Jeff Layton
2026-07-06 13:29 ` [PATCH v5 1/5] sunrpc: route to a populated pool in svc_pool_for_cpu() Jeff Layton
2026-07-06 13:29 ` [PATCH v5 2/5] sunrpc: hardcode pool_mode to pernode, remove other modes Jeff Layton
2026-07-06 13:29 ` [PATCH v5 3/5] sunrpc: guarantee a thread per pool when auto-distributing Jeff Layton
2026-07-06 13:29 ` [PATCH v5 4/5] sunrpc: tear down pool counters before dropping the pool map reference Jeff Layton
2026-07-06 13:29 ` [PATCH v5 5/5] sunrpc: derive the pool count instead of caching it in sv_nrpools Jeff Layton
2026-07-06 22:50   ` NeilBrown
2026-07-06 22:59     ` Jeff Layton
2026-07-06 20:50 ` [PATCH v5 0/5] sunrpc: hardcode pool_mode to pernode, remove other modes Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox