NFSD: add shrinker to reap courtesy clients on low memory condition
authorDai Ngo <dai.ngo@oracle.com>
Wed, 14 Sep 2022 15:54:26 +0000 (08:54 -0700)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 26 Sep 2022 18:02:41 +0000 (14:02 -0400)
commit7746b32f467b3813fb61faaab3258de35806a7ac
tree22ace645fe5c97affbe517c0f36395cdc2e898cf
parent3a4ea23d86a317c4b68b9a69d51f7e84e1e04357
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>
fs/nfsd/netns.h
fs/nfsd/nfs4state.c
fs/nfsd/nfsctl.c
fs/nfsd/nfsd.h