Linux NFS development
 help / color / mirror / Atom feed
* [PATCH v3 0/2] NFSD: memory shrinker for NFSv4 clients
@ 2022-08-30 19:14 Dai Ngo
  2022-08-30 19:14 ` [PATCH v3 1/2] NFSD: keep track of the number of courtesy clients in the system Dai Ngo
  2022-08-30 19:14 ` [PATCH v3 2/2] NFSD: add shrinker to reap courtesy clients on low memory condition Dai Ngo
  0 siblings, 2 replies; 5+ messages in thread
From: Dai Ngo @ 2022-08-30 19:14 UTC (permalink / raw)
  To: chuck.lever, jlayton; +Cc: linux-nfs

This patch series implements the memory shrinker for NFSv4 clients
to react to system low memory condition.

The memory shrinker's count callback is used to trigger the laundromat.
The actual work of destroying the expired clients is done by the
laundromat itself. We can not destroying the expired clients on the
memory shrinler's scan callback context to avoid possible deadlock.

By destroying the expired clients, all states associated with these
clients are also released.

v2:
. fix kernel test robot errors in nfsd.h when CONFIG_NFSD_V4 not defined.

v3:
. add mod_delayed_work in nfsd_courtesy_client_scan to kick start
  the laundromat.
---

Dai Ngo (2):
      NFSD: keep track of the number of courtesy clients in the system
      NFSD: add shrinker to reap courtesy clients on low memory condition

 fs/nfsd/netns.h     |  5 ++++
 fs/nfsd/nfs4state.c | 66 +++++++++++++++++++++++++++++++++++++++++++-----
 fs/nfsd/nfsctl.c    |  6 +++--
 fs/nfsd/nfsd.h      |  9 +++++--
 4 files changed, 75 insertions(+), 11 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-30 19:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-30 19:14 [PATCH v3 0/2] NFSD: memory shrinker for NFSv4 clients Dai Ngo
2022-08-30 19:14 ` [PATCH v3 1/2] NFSD: keep track of the number of courtesy clients in the system Dai Ngo
2022-08-30 19:40   ` Jeff Layton
2022-08-30 19:46     ` Chuck Lever III
2022-08-30 19:14 ` [PATCH v3 2/2] NFSD: add shrinker to reap courtesy clients on low memory condition Dai Ngo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox