OSDN Git Service

NFSD: add delegation reaper to react to low memory condition
authorDai Ngo <dai.ngo@oracle.com>
Thu, 17 Nov 2022 03:44:47 +0000 (19:44 -0800)
committerChuck Lever <cel@kernel.org>
Sat, 10 Dec 2022 16:01:12 +0000 (11:01 -0500)
commit44df6f439a1790a5f602e3842879efa88f346672
tree3f4ba612d056614685d124774a1174eff37177e9
parent3959066b697b5dfbb7141124ae9665337d4bc638
NFSD: add delegation reaper to react to low memory condition

The delegation reaper is called by nfsd memory shrinker's on
the 'count' callback. It scans the client list and sends the
courtesy CB_RECALL_ANY to the clients that hold delegations.

To avoid flooding the clients with CB_RECALL_ANY requests, the
delegation reaper sends only one CB_RECALL_ANY request to each
client per 5 seconds.

Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
[ cel: moved definition of RCA4_TYPE_MASK_RDATA_DLG ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4state.c
fs/nfsd/state.h
include/linux/nfs4.h