diff options
author | NeilBrown <neilb@suse.de> | 2021-11-29 05:51:25 +0100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2021-12-13 19:42:51 +0100 |
commit | 9b6c8c9bebccd5fb785c306b948c08874a88874d (patch) | |
tree | 8998256835b130819b13a728f521e0b31b407f9d /fs/nfsd/stats.h | |
parent | SUNRPC: stop using ->sv_nrthreads as a refcount (diff) | |
download | linux-9b6c8c9bebccd5fb785c306b948c08874a88874d.tar.xz linux-9b6c8c9bebccd5fb785c306b948c08874a88874d.zip |
nfsd: make nfsd_stats.th_cnt atomic_t
This allows us to move the updates for th_cnt out of the mutex.
This is a step towards reducing mutex coverage in nfsd().
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to '')
-rw-r--r-- | fs/nfsd/stats.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfsd/stats.h b/fs/nfsd/stats.h index 51ecda852e23..9b43dc3d9991 100644 --- a/fs/nfsd/stats.h +++ b/fs/nfsd/stats.h @@ -29,11 +29,9 @@ enum { struct nfsd_stats { struct percpu_counter counter[NFSD_STATS_COUNTERS_NUM]; - /* Protected by nfsd_mutex */ - unsigned int th_cnt; /* number of available threads */ + atomic_t th_cnt; /* number of available threads */ }; - extern struct nfsd_stats nfsdstats; extern struct svc_stat nfsd_svcstats; |