]> www.infradead.org Git - users/dwmw2/linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:24 +0000 (16:19 +0200)
commite18fc5fb2f00f6237582c88cbdd8c03a0a69ec14
treea1553d625c4fdb1482d5df639b4d3429027e655c
parented36015f7ef9bc623fe41f540c6d1889c7033fe5
NFSD: add delegation reaper to react to low memory condition

[ Upstream commit 44df6f439a1790a5f602e3842879efa88f346672 ]

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