]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sunrpc: split svc_set_num_threads() into two functions
authorJeff Layton <jlayton@kernel.org>
Tue, 6 Jan 2026 18:59:43 +0000 (13:59 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Wed, 28 Jan 2026 15:15:42 +0000 (10:15 -0500)
commite344f872628e769874c8cf30ec9a554bd55c26a3
treec651b2c1e69036b7c021f2bae19de68d8d8519eb
parent5288993c4d1a8e59310e007aa68cf9b856551cc6
sunrpc: split svc_set_num_threads() into two functions

svc_set_num_threads() will set the number of running threads for a given
pool. If the pool argument is set to NULL however, it will distribute
the threads among all of the pools evenly.

These divergent codepaths complicate the move to dynamic threading.
Simplify the API by splitting these two cases into different helpers:

Add a new svc_set_pool_threads() function that sets the number of
threads in a single, given pool. Modify svc_set_num_threads() to
distribute the threads evenly between all of the pools and then call
svc_set_pool_threads() for each.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/lockd/svc.c
fs/nfs/callback.c
fs/nfsd/nfssvc.c
include/linux/sunrpc/svc.h
net/sunrpc/svc.c