diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2023-01-10 10:31:54 -0500 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-02-20 09:20:32 -0500 |
commit | 65ba3d2425bf51165b6e88509c632bd15d12883d (patch) | |
tree | 63f796a78d0ff8b0ce5d635f10d9e543af89bab3 /net/sunrpc/svc.c | |
parent | f5f9d4a314da88c0a5faa6d168bf69081b7a25ae (diff) | |
download | lwn-65ba3d2425bf51165b6e88509c632bd15d12883d.tar.gz lwn-65ba3d2425bf51165b6e88509c632bd15d12883d.zip |
SUNRPC: Use per-CPU counters to tally server RPC counts
- Improves counting accuracy
- Reduces cross-CPU memory traffic
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r-- | net/sunrpc/svc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 7b208e063334..5dc298c30ea8 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -1208,7 +1208,7 @@ svc_generic_init_request(struct svc_rqst *rqstp, memset(rqstp->rq_resp, 0, procp->pc_ressize); /* Bump per-procedure stats counter */ - versp->vs_count[rqstp->rq_proc]++; + this_cpu_inc(versp->vs_count[rqstp->rq_proc]); ret->dispatch = versp->vs_dispatch; return rpc_success; |