Commit 2059b698 authored by Chuck Lever's avatar Chuck Lever

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: default avatarChuck Lever <chuck.lever@oracle.com>
parent 586095d3
...@@ -504,7 +504,7 @@ int svc_register(const struct svc_serv *, struct net *, const int, ...@@ -504,7 +504,7 @@ int svc_register(const struct svc_serv *, struct net *, const int,
void svc_wake_up(struct svc_serv *); void svc_wake_up(struct svc_serv *);
void svc_reserve(struct svc_rqst *rqstp, int space); void svc_reserve(struct svc_rqst *rqstp, int space);
struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu); struct svc_pool *svc_pool_for_cpu(struct svc_serv *serv);
char * svc_print_addr(struct svc_rqst *, char *, size_t); char * svc_print_addr(struct svc_rqst *, char *, size_t);
const char * svc_proc_name(const struct svc_rqst *rqstp); const char * svc_proc_name(const struct svc_rqst *rqstp);
int svc_encode_result_payload(struct svc_rqst *rqstp, int svc_encode_result_payload(struct svc_rqst *rqstp,
......
...@@ -356,15 +356,21 @@ svc_pool_map_set_cpumask(struct task_struct *task, unsigned int pidx) ...@@ -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. * svc_pool_for_cpu - Select pool to run a thread on this cpu
* Used when enqueueing an incoming RPC. Always returns * @serv: An RPC service
* a non-NULL pool pointer. *
* 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 * struct svc_pool *svc_pool_for_cpu(struct svc_serv *serv)
svc_pool_for_cpu(struct svc_serv *serv, int cpu)
{ {
struct svc_pool_map *m = &svc_pool_map; struct svc_pool_map *m = &svc_pool_map;
int cpu = raw_smp_processor_id();
unsigned int pidx = 0; unsigned int pidx = 0;
if (serv->sv_nrpools <= 1) if (serv->sv_nrpools <= 1)
......
...@@ -460,7 +460,7 @@ void svc_xprt_enqueue(struct svc_xprt *xprt) ...@@ -460,7 +460,7 @@ void svc_xprt_enqueue(struct svc_xprt *xprt)
if (test_and_set_bit(XPT_BUSY, &xprt->xpt_flags)) if (test_and_set_bit(XPT_BUSY, &xprt->xpt_flags))
return; 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); atomic_long_inc(&pool->sp_stats.packets);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment