From: Mike Snitzer <snitzer@kernel.org>
To: Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna@kernel.org>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH v9 0/7] NFS DIRECT: align misaligned DIO for LOCALIO
Date: Mon, 15 Sep 2025 11:41:08 -0400 [thread overview]
Message-ID: <20250915154115.19579-1-snitzer@kernel.org> (raw)
Hi,
NFS and LOCALIO in particular benefit from avoiding the page cache for
workloads that have a working set that is significantly larger than
available system memory. NFS DIRECT makes it possible to always enable
LOCALIO to use O_DIRECT even if the IO is not DIO-aligned.
This patchset's changes are focused on NFS LOCALIO (fs/nfs/localio.c);
as such they will not impact NFS at all unless CONFIG_NFS_LOCALIO=y
Please give this patchset full consideration for merging upstream for
v6.18, I'll fully support this code now, into v6.18-rcX and beyond.
Changes since v8 (08.15.2025):
- Removed all fs/nfs/direct.c changes and pushed this misaligned DIO
handling down to LOCALIO where it belongs.
- Updated all commit headers to reflect changes to code.
- Because misaligned DIO is now handled properly in LOCALIO, removed
the nfs modparam 'localio_O_DIRECT_semantics' that was added during
v6.14 to require users opt-in to the requirement that all O_DIRECT
be properly DIO-aligned.
- Enhanced LOCALIO's DIO WRITE code to handle potential for VFS to
return -ENOTBLK if it fails to invalidate page cache on WRITE.
- Verified various test IO workloads function as expected; including a
misaligned DIO test that failed with the previous v8 direct.c
implementation.
- Verified performance remains high with LOCALIO on fast NVMe.
- Verified sparse and checkpatch.pl are clean.
Earlier changelog was provided in v8's 0th patch header, see:
https://lore.kernel.org/linux-nfs/20250815233003.55071-1-snitzer@kernel.org/
All review appreciated, thanks.
Mike
Mike Snitzer (7):
nfs/localio: make trace_nfs_local_open_fh more useful
nfs/localio: avoid issuing misaligned IO using O_DIRECT
nfs/localio: refactor iocb and iov_iter_bvec initialization
nfs/localio: refactor iocb initialization further
nfs/localio: add proper O_DIRECT support for READ and WRITE
nfs/localio: add tracepoints for misaligned DIO READ and WRITE support
NFS: add basic STATX_DIOALIGN and STATX_DIO_READ_ALIGN support
fs/nfs/inode.c | 15 ++
fs/nfs/internal.h | 10 +
fs/nfs/localio.c | 411 ++++++++++++++++++++++++++++---------
fs/nfs/nfs3xdr.c | 2 +-
fs/nfs/nfstrace.h | 76 ++++++-
fs/nfsd/localio.c | 11 +
include/linux/nfslocalio.h | 2 +
7 files changed, 426 insertions(+), 101 deletions(-)
--
2.44.0
next reply other threads:[~2025-09-15 15:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 15:41 Mike Snitzer [this message]
2025-09-15 15:41 ` [PATCH v9 1/7] nfs/localio: make trace_nfs_local_open_fh more useful Mike Snitzer
2025-09-15 15:41 ` [PATCH v9 2/7] nfs/localio: avoid issuing misaligned IO using O_DIRECT Mike Snitzer
2025-09-15 15:41 ` [PATCH v9 3/7] nfs/localio: refactor iocb and iov_iter_bvec initialization Mike Snitzer
2025-09-15 15:41 ` [PATCH v9 4/7] nfs/localio: refactor iocb initialization further Mike Snitzer
2025-09-15 15:41 ` SYNCFrom cb702c86aa12e5477e1e4aca0c1384a821f2afef Mon Sep 17 00:00:00 2001 Mike Snitzer
2025-09-15 15:47 ` [PATCH v9 5/7] nfs/localio: add proper O_DIRECT support for READ and WRITE Mike Snitzer
2025-09-15 15:41 ` [PATCH v9 6/7] nfs/localio: add tracepoints for misaligned DIO READ and WRITE support Mike Snitzer
2025-09-15 15:41 ` [PATCH v9 7/7] NFS: add basic STATX_DIOALIGN and STATX_DIO_READ_ALIGN support Mike Snitzer
[not found] ` <aMiMpYAcHV8bYU4W@kernel.org>
[not found] ` <aNLfroQ8Ti1Vh5wh@kernel.org>
[not found] ` <aNQqUprZ3DuJhMe4@kernel.org>
[not found] ` <aNgSOM9EzMS_Q6bR@kernel.org>
2025-09-30 16:26 ` [GIT PULL] NFS LOCALIO O_DIRECT changes for Linux 6.18 Mike Snitzer
2025-09-30 17:15 ` Chuck Lever
2025-09-30 17:35 ` Mike Snitzer
2025-09-30 17:59 ` Chuck Lever
2025-09-30 19:32 ` [GIT PULL v2] " Mike Snitzer
2025-09-30 20:53 ` Anna Schumaker
2025-09-30 21:30 ` Mike Snitzer
2025-10-01 16:04 ` Mike Snitzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250915154115.19579-1-snitzer@kernel.org \
--to=snitzer@kernel.org \
--cc=anna@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).