linux/Documentation
Jeff Layton a1a7071195 sunrpc: hardcode pool_mode to pernode, remove other modes
The SVC_POOL_AUTO/GLOBAL/PERCPU/PERNODE pool mode selection machinery
was added when NUMA was new and the right default was unclear.  The
default has always been "global" (a single pool for the whole service);
the other modes were only used when an admin explicitly set the
pool_mode parameter or asked for "auto", which then picked a mode from
the host topology.  Today, pernode is the right choice everywhere:

- On multi-NUMA hosts, it gives one pool per node with proper thread
  affinity and NUMA-local memory allocation.
- On single-node hosts, pernode degenerates to exactly one pool,
  identical to the old "global" mode -- svc_pool_for_cpu() short-
  circuits when sv_nrpools <= 1, no CPU affinity is set, and memory
  is allocated from the single node.

The percpu mode (one pool per CPU) created excessive pools relative to
the number of threads most deployments run, and was only auto-selected
in a narrow case (single node, >2 CPUs).

Note that this changes the default behaviour on multi-NUMA hosts: a
service that previously ran with a single global pool now gets one pool
per NUMA node by default.  This in turn means a host running fewer
threads than it has NUMA nodes can end up with pools that have no
threads.  svc_pool_for_cpu() already falls back to a populated pool in
that case, so transports are still serviced.

Remove the SVC_POOL_* enum, mode selection heuristic,
svc_pool_map_init_percpu(), and all mode-based switch statements.
Simplify pool map functions to always use the pernode path.  If pool
map allocation fails, svc_pool_map_get() now returns 0 and service
creation fails, rather than silently falling back to a single global
pool.

With the mode check gone, svc_pool_map_get_node() would dereference the
shared pool_to[] for every service that starts a thread.  Only services
created via svc_create_pooled() hold a map reference that keeps that
array allocated, so gate the lookup in svc_new_thread() on sv_is_pooled:
unpooled services (e.g. lockd, the NFS callback) use NUMA_NO_NODE and
never consult the map.  The kmalloc_node() callers in
svc_prepare_thread() already accept NUMA_NO_NODE, but __folio_alloc_node()
requires a valid node id, so resolve NUMA_NO_NODE to numa_mem_id() for
the scratch folio allocation.

The module parameter and netlink interfaces are preserved for backward
compatibility:
- Writing any of the four documented mode names still succeeds silently
- Reading always returns "pernode"
- Writing to the module parameter emits a deprecation notice

Update Documentation/admin-guide/kernel-parameters.txt to mark the
pool_mode parameter deprecated and describe the new behaviour.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260706-sunrpc-pool-mode-v5-2-6c4ee7cd89aa@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
2026-08-10 09:54:35 -04:00
..
ABI Power Supply Fixes for 7.2 cycle 2026-07-30 16:50:17 -07:00
accel accel/amdxdna: Expose per-client BO memory usage via fdinfo 2026-04-09 13:41:47 -07:00
accounting
admin-guide sunrpc: hardcode pool_mode to pernode, remove other modes 2026-08-10 09:54:35 -04:00
arch KVM: arm64: vgic: Avoid double-deactivate of IRQs in the nested context 2026-07-21 11:19:00 +01:00
block for-7.2/block-20260615 2026-06-16 13:02:47 +05:30
bpf Documentation/bpf: Refresh map_lru_hash_update.dot for rqspinlock 2026-06-07 18:46:13 -07:00
cdrom
core-api liveupdate: updates for 7.2-rc1 2026-06-21 09:46:14 -07:00
cpu-freq cpufreq: Use policy->min/max init as QoS request 2026-06-08 18:42:14 +02:00
crypto lib/crypto: docs: Improve introduction sentence 2026-07-09 11:06:05 -04:00
dev-tools linux_kselftest-next-7.2-rc1-second 2026-06-23 07:35:37 -07:00
devicetree SCSI fixes on 20260802 2026-08-02 09:32:07 -07:00
doc-guide
driver-api A handful of late-arriving docs fixes, along with one document update 2026-06-25 09:09:38 -07:00
edac
fault-injection
fb
features LoongArch: Add THREAD_INFO_IN_TASK implementation 2026-06-25 13:03:47 +08:00
filesystems ksmbd: doc: update feature support status for durable handles and compression 2026-06-30 21:29:46 -05:00
firmware_class
firmware-guide docs: acpi: dsd: add Motorcomm yt8xxx PHY properties 2026-05-11 18:05:22 -07:00
fpga
gpu drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
hid Docs: hid: intel-ish-hid: make long URL usable 2026-04-09 08:40:41 -06:00
hwmon docs: hwmon: ltc4283: fix malformed table docs build error 2026-06-29 08:47:44 -07:00
i2c
iio docs: iio: adc: ad4691: add driver documentation 2026-05-31 11:14:22 +01:00
images
infiniband docs: infiniband: correct name of option to enable the ib_uverbs module 2026-06-16 14:47:24 -03:00
input Input: userio - allow setting other id values 2026-06-01 21:49:14 -07:00
kbuild kconfig: add optional warnings for changed input values 2026-06-18 11:46:32 -07:00
kernel-hacking Documentation: adopt new coding style of type-aware kmalloc-family 2026-05-03 08:54:21 -06:00
leds LEDs for v7.2 2026-06-18 14:45:08 -07:00
litmus-tests
livepatch
locking Things have calmed down a bit on the docs front, with no earthshaking 2026-06-16 08:35:59 +05:30
maintainer docs: auto-generate maintainer entry profile links 2026-05-03 09:24:30 -06:00
mhi
misc-devices misc: Remove old APDS990x driver 2026-04-27 09:58:24 +01:00
mm A handful of late-arriving docs fixes, along with one document update 2026-06-25 09:09:38 -07:00
netlabel
netlink netlink: specs: rt-link: convert bridge port flag attributes to u8 2026-07-20 18:14:42 -07:00
networking xsk: reclaim invalid Tx descriptors in ZC batch path 2026-07-24 15:12:14 -07:00
nvdimm
nvme
PCI Documentation: PCI: Fix typos 2026-04-27 09:47:42 -05:00
pcmcia
peci
power
process MAINTAINERS: update ndesaulniers 2026-07-06 15:49:29 -07:00
RCU Documentation: RCU: adopt new coding style of type-aware kmalloc-family 2026-05-03 08:55:13 -06:00
rust s390 updates for 7.2 merge window 2026-06-16 05:08:13 +05:30
scheduler sched_ext: Documentation: Fix ops table header reference 2026-07-07 12:23:33 -10:00
scsi scsi: st: Fix typo in documentation 2026-05-14 21:59:19 -04:00
security integrity-v7.2 2026-06-19 11:32:05 -07:00
sound Documentation: sound: tas675x: Fix temperature range and impedance documentation 2026-07-01 19:52:38 +01:00
sphinx docs: maintainers_include: keep the last entry at the end 2026-05-25 14:24:09 -06:00
sphinx-includes
sphinx-static docs: sphinx-static: fix typo "wich" -> "which" 2026-05-15 07:52:37 -06:00
spi Documentation: adopt new coding style of type-aware kmalloc-family 2026-05-03 08:54:21 -06:00
staging docs: staging: fix various typos and grammar issues 2026-04-27 04:00:29 -06:00
sunrpc/xdr nfsd: add support to CB_NOTIFY for dir attribute changes 2026-08-10 09:54:35 -04:00
target
tee
timers
tools A handful of late-arriving docs fixes, along with one document update 2026-06-25 09:09:38 -07:00
trace A handful of late-arriving docs fixes, along with one document update 2026-06-25 09:09:38 -07:00
translations MAINTAINERS: update ndesaulniers 2026-07-06 15:49:29 -07:00
usb
userspace-api Char/Misc/IIO/FPGA/GPIB/etc driver updates for 7.2-rc1 2026-06-22 12:20:21 -07:00
virt KVM/arm64 fixes for 7.2, take #3 2026-07-28 17:43:23 +02:00
w1
watchdog docs: watchdog: Fix brackets 2026-07-02 07:12:58 -07:00
wmi modpost: Handle malformed WMI GUID strings 2026-06-12 16:01:55 +03:00
.gitignore
.renames.txt Revert "drivers: net: 3com: 3c509: Remove this driver" 2026-05-21 08:28:56 -07:00
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst net: remove ISDN subsystem and Bluetooth CMTP 2026-04-23 10:24:02 -07:00