mbox series

[RFC,0/2] NFSD: add a setting to disable splice reads

Message ID 20250308201438.2217-1-cel@kernel.org (mailing list archive)
Headers show
Series NFSD: add a setting to disable splice reads | expand

Message

Chuck Lever March 8, 2025, 8:14 p.m. UTC
From: Chuck Lever <chuck.lever@oracle.com>

The usual policy for kernel-user space APIs is that once a public
API appears, it is difficult to change or remove, in order to
maintain backwards compatibility with user space software.

This series introduces /sys/kernel/debug/nfsd/ where we can
hopefully place ephemeral and undocumented settings for testing NFSD
features that are to be added or deprecated without the worry of
having to support an administrative API forever without change,
amen.

As a first consumer of this user-kernel API, the series adds a
simple disable-splice-read setting, which can force all NFS READ
operations to use vfs_iter_read() rather than page splicing to fill
data content for an NFS reply.

The splice read path is the default on most file systems, so it gets
most of the test experience. The purpose of this new setting is to
enable test runners to force the use of the iov iter path. We are
also interested in comparing the performance of the splice and iter
paths, as a prelude to potentially removing page splicing. This new
setting makes it easy to benchmark either read mode without having
to rebuild the kernel.

We have an eye on a few other consumers, such as uncached I/O and
increasing the maximum r/wsize, for which /sys/kernel/debug/nfsd
might be suitable while their performance impact is studied before
a concrete administrative interface is agreed upon.

Opinions and code review are welcome, as always.

Chuck Lever (2):
  NFSD: Add /sys/kernel/debug/nfsd
  NFSD: Add experimental setting to disable the use of splice read

 fs/nfsd/Makefile  |  1 +
 fs/nfsd/debugfs.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 fs/nfsd/nfsctl.c  |  4 ++++
 fs/nfsd/nfsd.h    | 10 ++++++++++
 fs/nfsd/vfs.c     |  4 ++++
 5 files changed, 66 insertions(+)
 create mode 100644 fs/nfsd/debugfs.c

Comments

Jeff Layton March 10, 2025, 12:08 p.m. UTC | #1
On Sat, 2025-03-08 at 15:14 -0500, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> The usual policy for kernel-user space APIs is that once a public
> API appears, it is difficult to change or remove, in order to
> maintain backwards compatibility with user space software.
> 
> This series introduces /sys/kernel/debug/nfsd/ where we can
> hopefully place ephemeral and undocumented settings for testing NFSD
> features that are to be added or deprecated without the worry of
> having to support an administrative API forever without change,
> amen.
> 
> As a first consumer of this user-kernel API, the series adds a
> simple disable-splice-read setting, which can force all NFS READ
> operations to use vfs_iter_read() rather than page splicing to fill
> data content for an NFS reply.
> 
> The splice read path is the default on most file systems, so it gets
> most of the test experience. The purpose of this new setting is to
> enable test runners to force the use of the iov iter path. We are
> also interested in comparing the performance of the splice and iter
> paths, as a prelude to potentially removing page splicing. This new
> setting makes it easy to benchmark either read mode without having
> to rebuild the kernel.
> 
> We have an eye on a few other consumers, such as uncached I/O and
> increasing the maximum r/wsize, for which /sys/kernel/debug/nfsd
> might be suitable while their performance impact is studied before
> a concrete administrative interface is agreed upon.
> 
> Opinions and code review are welcome, as always.
> 
> Chuck Lever (2):
>   NFSD: Add /sys/kernel/debug/nfsd
>   NFSD: Add experimental setting to disable the use of splice read
> 
>  fs/nfsd/Makefile  |  1 +
>  fs/nfsd/debugfs.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
>  fs/nfsd/nfsctl.c  |  4 ++++
>  fs/nfsd/nfsd.h    | 10 ++++++++++
>  fs/nfsd/vfs.c     |  4 ++++
>  5 files changed, 66 insertions(+)
>  create mode 100644 fs/nfsd/debugfs.c
> 

Looks good to me:

Reviewed-by: Jeff Layton <jlayton@kernel.org>