On Thu, 2022-10-06 at 12:20 -0400, Chuck Lever wrote: > I'm proposing this series as the first NFSD-related patchset to go > into v6.2 (for-next), though I haven't opened that yet. > > For quite some time, we've been encouraged to disable filecache > garbage collection for NFSv4 files, and I think I found a surgical > way to do just that. That is presented in "NFSD: Add an NFSD_FILE_GC > flag to enable nfsd_file garbage collection". > > Comments and opinions are welcome. > > Changes since RFC: > - checking nfs4_files for inode aliases is now done only on hash > insertion > - the nfs4_file reference count is now bumped only while the RCU > read lock is held > - comments and function names have been revised and clarified > > I haven't updated the new @want_gc parameter... jury is still out. > It was just a nit I noticed since it looked like it was being used as a bool. If you think it needs to be an int, then so be it. > --- > > Chuck Lever (7): > NFSD: Pass the target nfsd_file to nfsd_commit() > NFSD: Revert "NFSD: NFSv4 CLOSE should release an nfsd_file immediately" > NFSD: Add an NFSD_FILE_GC flag to enable nfsd_file garbage collection > NFSD: Use const pointers as parameters to fh_ helpers. > NFSD: Use rhashtable for managing nfs4_file objects > NFSD: Clean up nfs4_preprocess_stateid_op() call sites > NFSD: Trace delegation revocations > > Jeff Layton (2): > nfsd: fix nfsd_file_unhash_and_dispose > nfsd: rework hashtable handling in nfsd_do_file_acquire > > > fs/nfsd/filecache.c | 165 +++++++++++++++--------------- > fs/nfsd/filecache.h | 4 +- > fs/nfsd/nfs3proc.c | 10 +- > fs/nfsd/nfs4proc.c | 42 ++++---- > fs/nfsd/nfs4state.c | 241 ++++++++++++++++++++++++++++++-------------- > fs/nfsd/nfsfh.h | 10 +- > fs/nfsd/state.h | 5 +- > fs/nfsd/trace.h | 58 ++++++++++- > fs/nfsd/vfs.c | 19 ++-- > fs/nfsd/vfs.h | 3 +- > 10 files changed, 351 insertions(+), 206 deletions(-) I been doing some testing with this and it seems to be working well. You can add: Tested-by: Jeff Layton <jlayton@xxxxxxxxxx>