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 /fs/nfsd/nfsproc.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 'fs/nfsd/nfsproc.c')
-rw-r--r-- | fs/nfsd/nfsproc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index 9744443c3965..9e6069e9c9f1 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c @@ -838,11 +838,11 @@ static const struct svc_procedure nfsd_procedures2[18] = { }, }; - -static unsigned int nfsd_count2[ARRAY_SIZE(nfsd_procedures2)]; +static DEFINE_PER_CPU_ALIGNED(unsigned long, + nfsd_count2[ARRAY_SIZE(nfsd_procedures2)]); const struct svc_version nfsd_version2 = { .vs_vers = 2, - .vs_nproc = 18, + .vs_nproc = ARRAY_SIZE(nfsd_procedures2), .vs_proc = nfsd_procedures2, .vs_count = nfsd_count2, .vs_dispatch = nfsd_dispatch, |