aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/netns.h
diff options
context:
space:
mode:
authorDai Ngo <dai.ngo@oracle.com>2022-09-14 08:54:26 -0700
committerChuck Lever <chuck.lever@oracle.com>2022-09-26 14:02:41 -0400
commit7746b32f467b3813fb61faaab3258de35806a7ac (patch)
tree22ace645fe5c97affbe517c0f36395cdc2e898cf /fs/nfsd/netns.h
parentNFSD: keep track of the number of courtesy clients in the system (diff)
downloadlinux-dev-7746b32f467b3813fb61faaab3258de35806a7ac.tar.xz
linux-dev-7746b32f467b3813fb61faaab3258de35806a7ac.zip
NFSD: add shrinker to reap courtesy clients on low memory condition
Add courtesy_client_reaper to react to low memory condition triggered by the system memory shrinker. The delayed_work for the courtesy_client_reaper is scheduled on the shrinker's count callback using the laundry_wq. The shrinker's scan callback is not used for expiring the courtesy clients due to potential deadlocks. Signed-off-by: Dai Ngo <dai.ngo@oracle.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/netns.h')
-rw-r--r--fs/nfsd/netns.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h
index 55c7006d6109..8c854ba3285b 100644
--- a/fs/nfsd/netns.h
+++ b/fs/nfsd/netns.h
@@ -194,6 +194,8 @@ struct nfsd_net {
int nfs4_max_clients;
atomic_t nfsd_courtesy_clients;
+ struct shrinker nfsd_client_shrinker;
+ struct delayed_work nfsd_shrinker_work;
};
/* Simple check to find out if a given net was properly initialized */