Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+14 -8
+1 -1
include/linux/sunrpc/svc.h
··· 504 504 505 505 void svc_wake_up(struct svc_serv *); 506 506 void svc_reserve(struct svc_rqst *rqstp, int space); 507 - struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu); 507 + struct svc_pool *svc_pool_for_cpu(struct svc_serv *serv); 508 508 char * svc_print_addr(struct svc_rqst *, char *, size_t); 509 509 const char * svc_proc_name(const struct svc_rqst *rqstp); 510 510 int svc_encode_result_payload(struct svc_rqst *rqstp,
+12 -6
net/sunrpc/svc.c
··· 356 356 } 357 357 } 358 358 359 - /* 360 - * Use the mapping mode to choose a pool for a given CPU. 361 - * Used when enqueueing an incoming RPC. Always returns 362 - * a non-NULL pool pointer. 359 + /** 360 + * svc_pool_for_cpu - Select pool to run a thread on this cpu 361 + * @serv: An RPC service 362 + * 363 + * Use the active CPU and the svc_pool_map's mode setting to 364 + * select the svc thread pool to use. Once initialized, the 365 + * svc_pool_map does not change. 366 + * 367 + * Return value: 368 + * A pointer to an svc_pool 363 369 */ 364 - struct svc_pool * 365 - svc_pool_for_cpu(struct svc_serv *serv, int cpu) 370 + struct svc_pool *svc_pool_for_cpu(struct svc_serv *serv) 366 371 { 367 372 struct svc_pool_map *m = &svc_pool_map; 373 + int cpu = raw_smp_processor_id(); 368 374 unsigned int pidx = 0; 369 375 370 376 if (serv->sv_nrpools <= 1)
+1 -1
net/sunrpc/svc_xprt.c
··· 460 460 if (test_and_set_bit(XPT_BUSY, &xprt->xpt_flags)) 461 461 return; 462 462 463 - pool = svc_pool_for_cpu(xprt->xpt_server, raw_smp_processor_id()); 463 + pool = svc_pool_for_cpu(xprt->xpt_server); 464 464 465 465 atomic_long_inc(&pool->sp_stats.packets); 466 466