Re: (subset) [PATCH v5 00/13] NFSD DIRECT and NFS DIRECT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 28, 2025 at 09:53:45AM -0400, Chuck Lever wrote:
> On 7/28/25 9:51 AM, Mike Snitzer wrote:
> > On Sun, Jul 27, 2025 at 12:16:04PM -0400, Chuck Lever wrote:
> >> From: Chuck Lever <chuck.lever@xxxxxxxxxx>
> >>
> >> On Thu, 24 Jul 2025 15:30:49 -0400, Mike Snitzer wrote:
> >>> Some workloads benefit from NFSD avoiding the page cache, particularly
> >>> those with a working set that is significantly larger than available
> >>> system memory.  This patchset introduces _optional_ support to
> >>> configure the use of O_DIRECT or DONTCACHE for NFSD's READ and WRITE
> >>> support.  The NFSD default to use page cache is left unchanged.
> >>>
> >>> The performance win associated with using NFSD DIRECT was previously
> >>> summarized here:
> >>> https://lore.kernel.org/linux-nfs/aEslwqa9iMeZjjlV@xxxxxxxxxx/
> >>> This picture offers a nice summary of performance gains:
> >>> https://original.art/NFSD_direct_vs_buffered_IO.jpg
> >>>
> >>> [...]
> >>
> >> Applied to nfsd-testing, thanks!
> >>
> >> [01/13] NFSD: filecache: add STATX_DIOALIGN and STATX_DIO_READ_ALIGN support
> >>         commit: af157e09634a113da83d8ac5fff541f9e06ad653
> > 
> >> [05/13] NFSD: filecache: only get DIO alignment attrs if NFSD_IO_DIRECT enabled
> >>         commit: af157e09634a113da83d8ac5fff541f9e06ad653
> > 
> > I noticed you folded these, unfortunately that isn't bisect safe
> > unless you pull these fs/nfsd/nfsd.h changes to the front too:
> > 
> > git diff f76b72e4908c556021d94bdeca86fffce430c791^..a45da44bb6bade1dfef569c792ae2ee6507f4724 -- fs/nfsd/nfsd.h
> > 
> > diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
> > index 1cd0bed57bc2..fe935b4cda53 100644
> > --- a/fs/nfsd/nfsd.h
> > +++ b/fs/nfsd/nfsd.h
> > @@ -153,6 +153,16 @@ static inline void nfsd_debugfs_exit(void) {}
> >  
> >  extern bool nfsd_disable_splice_read __read_mostly;
> >  
> > +enum {
> > +	NFSD_IO_UNSPECIFIED = 0,
> > +	NFSD_IO_BUFFERED,
> > +	NFSD_IO_DONTCACHE,
> > +	NFSD_IO_DIRECT,
> > +};
> > +
> > +extern u64 nfsd_io_cache_read __read_mostly;
> > +extern u64 nfsd_io_cache_write __read_mostly;
> > +
> >  extern int nfsd_max_blksize;
> >  
> >  static inline int nfsd_v4client(struct svc_rqst *rq)
> > 
> >> [02/13] NFSD: pass nfsd_file to nfsd_iter_read()
> >>         commit: 63a534c8b18642dc27318e08b77952c4d7f55628
> >> [03/13] NFSD: add io_cache_read controls to debugfs interface
> >>         commit: f76b72e4908c556021d94bdeca86fffce430c791
> >> [04/13] NFSD: add io_cache_write controls to debugfs interface
> >>         commit: a45da44bb6bade1dfef569c792ae2ee6507f4724
> > 
> >> [06/13] NFSD: issue READs using O_DIRECT even if IO is misaligned
> >>         commit: 6d80efb3cb6f9817bedfa460e9ddf56a916caf2f
> > 
> > Thanks!
> > Mike
> 
> That's what I get for compile-testing first before squashing.

It happens, you also need this from vfs.c:

diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 9bbc97aebbea..a7a587736a22 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -49,6 +49,8 @@
 #define NFSDDBG_FACILITY		NFSDDBG_FILEOP
 
 bool nfsd_disable_splice_read __read_mostly;
+u64 nfsd_io_cache_read __read_mostly;
+u64 nfsd_io_cache_write __read_mostly;
 
 /**




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux