Linux NFS development
 help / color / mirror / Atom feed
* [PATCH v8 00/12] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE
@ 2025-10-27 15:46 Chuck Lever
  2025-10-27 15:46 ` [PATCH v8 01/12] NFSD: Make FILE_SYNC WRITEs comply with spec Chuck Lever
                   ` (11 more replies)
  0 siblings, 12 replies; 27+ messages in thread
From: Chuck Lever @ 2025-10-27 15:46 UTC (permalink / raw)
  To: NeilBrown, Jeff Layton, Olga Kornievskaia, Dai Ngo, Tom Talpey
  Cc: linux-nfs, Christoph Hellwig, Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

Following on https://lore.kernel.org/linux-nfs/aPAci7O_XK1ljaum@kernel.org/
this series includes the patches needed to make NFSD Direct WRITE
operational.

I've reduced the amount of CPU effort needed to determine when
IOCB_DIRECT can be used. Because a receive buffer is comprised of
contiguous pages, the elements in the bvec after the first one
always have bv_offset == 0, thus they are always memory-aligned.
From there, further simplifications are possible. (This is an effort
to address Christoph's observation that the construction of the
bvec array was inefficient and duplicative).

We've also determined that there might be actual work in the storage
layer that might be better off left until a subsequent COMMIT. So
this series no longer promotes all NFSD_IO_DIRECT writes to be
FILE_SYNC, but instead, observes the client's stable_how argument.

If any of these changes results in a regression, I'll revisit.

Noted that one of the fstests triggers the NFS server's kernel
to emit this warning:

WARNING: CPU: 5 PID: 1348 at fs/iomap/buffered-io.c:1402
	iomap_zero_iter+0x1a4/0x390

mlperf_npz_tool.py passes on NFSv3 with both TCP and RDMA, as does
the git regression test suite with jobs=24.

Changes since v7:
* Rebase the series on Mike's original v3 patch
* Address more review comments
* Optimize the "when can NFSD use IOCB_DIRECT" logic
* Revert the "always promote to FILE_SYNC" logic

Changes since v6:
* Patches to address review comments have been split out
* Refactored the iter initialization code

Changes since v5:
* Add a patch to make FILE_SYNC WRITEs persist timestamps
* Address some of Christoph's review comments
* The svcrdma patch has been dropped until we actually need it

Changes since v4:
* Split out refactoring nfsd_buffered_write() into a separate patch
* Expand patch description of 1/4
* Don't set IOCB_SYNC flag

Changes since v3:
* Address checkpatch.pl nits in 2/3
* Add an untested patch to mark ingress RDMA Read chunks

Chuck Lever (11):
  NFSD: Make FILE_SYNC WRITEs comply with spec
  NFSD: Enable return of an updated stable_how to NFS clients
  NFSD: Remove specific error handling
  NFSD: Remove alignment size checking
  NFSD: Clean up struct nfsd_write_dio
  NFSD: Introduce struct nfsd_write_dio_seg
  NFSD: Simplify nfsd_iov_iter_aligned_bvec()
  NFSD: Handle both offset and memory alignment for direct I/O
  NFSD: Combine direct I/O feasibility check with iterator setup
  NFSD: Handle kiocb->ki_flags correctly
  NFSD: Refactor nfsd_vfs_write

Mike Snitzer (1):
  NFSD: Implement NFSD_IO_DIRECT for NFS WRITE

 fs/nfsd/debugfs.c   |   1 +
 fs/nfsd/filecache.c |   5 +
 fs/nfsd/filecache.h |   1 +
 fs/nfsd/nfs3proc.c  |   2 +-
 fs/nfsd/nfs4proc.c  |   2 +-
 fs/nfsd/nfsproc.c   |   3 +-
 fs/nfsd/trace.h     |   1 +
 fs/nfsd/vfs.c       | 222 +++++++++++++++++++++++++++++++++++++++++---
 fs/nfsd/vfs.h       |   6 +-
 fs/nfsd/xdr3.h      |   2 +-
 10 files changed, 228 insertions(+), 17 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2025-10-31 16:07 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 15:46 [PATCH v8 00/12] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE Chuck Lever
2025-10-27 15:46 ` [PATCH v8 01/12] NFSD: Make FILE_SYNC WRITEs comply with spec Chuck Lever
2025-10-27 15:46 ` [PATCH v8 02/12] NFSD: Enable return of an updated stable_how to NFS clients Chuck Lever
2025-10-27 15:46 ` [PATCH v8 03/12] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE Chuck Lever
2025-10-27 15:46 ` [PATCH v8 04/12] NFSD: Remove specific error handling Chuck Lever
2025-10-27 15:46 ` [PATCH v8 05/12] NFSD: Remove alignment size checking Chuck Lever
2025-10-27 15:46 ` [PATCH v8 06/12] NFSD: Clean up struct nfsd_write_dio Chuck Lever
2025-10-27 15:46 ` [PATCH v8 07/12] NFSD: Introduce struct nfsd_write_dio_seg Chuck Lever
2025-10-27 15:46 ` [PATCH v8 08/12] NFSD: Simplify nfsd_iov_iter_aligned_bvec() Chuck Lever
2025-10-30 15:00   ` Jeff Layton
2025-10-31 13:16   ` Christoph Hellwig
2025-10-27 15:46 ` [PATCH v8 09/12] NFSD: Handle both offset and memory alignment for direct I/O Chuck Lever
2025-10-30 19:52   ` Jeff Layton
2025-10-30 19:55     ` Chuck Lever
2025-10-31  9:13     ` Christoph Hellwig
2025-10-31 13:19   ` Christoph Hellwig
2025-10-31 13:21     ` Chuck Lever
2025-10-31 13:23       ` Christoph Hellwig
2025-10-31 16:07       ` Mike Snitzer
2025-10-27 15:46 ` [PATCH v8 10/12] NFSD: Combine direct I/O feasibility check with iterator setup Chuck Lever
2025-10-30 19:59   ` Jeff Layton
2025-10-31 13:20   ` Christoph Hellwig
2025-10-27 15:46 ` [PATCH v8 11/12] NFSD: Handle kiocb->ki_flags correctly Chuck Lever
2025-10-30 20:01   ` Jeff Layton
2025-10-31 13:21   ` Christoph Hellwig
2025-10-27 15:46 ` [PATCH v8 12/12] NFSD: Refactor nfsd_vfs_write Chuck Lever
2025-10-30 20:02   ` Jeff Layton

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