diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2022-05-10 11:45:53 -0400 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-05-19 12:25:40 -0400 |
commit | 2059b698a2efcce3c67b0e61eab7d7680bbe10bd (patch) | |
tree | 5336a5b376ecd8314707ee847470a94ac9345197 /net/sunrpc | |
parent | 586095d339b1b46f4283863e6e8e15de662a3f93 (diff) |
SUNRPC: Simplify synopsis of svc_pool_for_cpu()
Clean up: There is one caller. The @cpu argument can be made
implicit now that a get_cpu/put_cpu pair is no longer needed.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/svc.c | 18 | ||||
-rw-r--r-- | net/sunrpc/svc_xprt.c | 2 |
2 files changed, 13 insertions, 7 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 557004017548..56bed0a57eea 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -356,15 +356,21 @@ svc_pool_map_set_cpumask(struct task_struct *task, unsigned int pidx) } } -/* - * Use the mapping mode to choose a pool for a given CPU. - * Used when enqueueing an incoming RPC. Always returns - * a non-NULL pool pointer. +/** + * svc_pool_for_cpu - Select pool to run a thread on this cpu + * @serv: An RPC service + * + * Use the active CPU and the svc_pool_map's mode setting to + * select the svc thread pool to use. Once initialized, the + * svc_pool_map does not change. + * + * Return value: + * A pointer to an svc_pool */ -struct svc_pool * -svc_pool_for_cpu(struct svc_serv *serv, int cpu) +struct svc_pool *svc_pool_for_cpu(struct svc_serv *serv) { struct svc_pool_map *m = &svc_pool_map; + int cpu = raw_smp_processor_id(); unsigned int pidx = 0; if (serv->sv_nrpools <= 1) diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 66cf720853bb..5df90bca10ed 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -460,7 +460,7 @@ void svc_xprt_enqueue(struct svc_xprt *xprt) if (test_and_set_bit(XPT_BUSY, &xprt->xpt_flags)) return; - pool = svc_pool_for_cpu(xprt->xpt_server, raw_smp_processor_id()); + pool = svc_pool_for_cpu(xprt->xpt_server); atomic_long_inc(&pool->sp_stats.packets); |