From: Mike Snitzer <snitzer@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Anna Schumaker <anna.schumaker@oracle.com>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
linux-nfs@vger.kernel.org
Subject: Re: [v6.18-rcX PATCH 2/3] nfs/localio: add refcounting for each iocb IO associated with NFS pgio header
Date: Mon, 27 Oct 2025 09:55:14 -0400 [thread overview]
Message-ID: <aP95wjsM2LndIY1X@kernel.org> (raw)
In-Reply-To: <aP9xVCiY5mYowEoN@infradead.org>
On Mon, Oct 27, 2025 at 06:19:16AM -0700, Christoph Hellwig wrote:
> On Mon, Oct 27, 2025 at 09:08:32AM -0400, Mike Snitzer wrote:
> > Improve completion handling of as many as 3 IOs associated with each
> > misaligned DIO by using a atomic_t to track completion of each IO.
> >
> > Update nfs_local_pgio_done() to use precise atomic_t accounting for
> > remaining iov_iter (up to 3) associated with each iocb, so that each
> > NFS LOCALIO pgio header is only released after all IOs have completed.
> > But also allow early return if/when a short read or write occurs.
>
> Maybe just split the pgio instead? That's what a lot of the pnfs code
> does.
I already tried that, in terms of frontend fs/nfs/direct.c and then
supporting fs/nfs/pagelist.c changes; ended up being pretty nasty (and
overdone because in general the NFS client doesn't need to do this
extra work if its not using LOCALIO).
We only need this misaligned DIO splitting for LOCALIO's benefit
because in general the NFS client is perfectly happy handling
misaligned DIO (and sending it out over the wire).
next prev parent reply other threads:[~2025-10-27 13:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-19 9:29 [Bug report] xfstests generic/323 over NFS hit BUG: KASAN: slab-use-after-free in nfs_local_call_read on 6.18.0-rc1 Yongcheng Yang
2025-10-19 15:18 ` Trond Myklebust
2025-10-19 16:26 ` Mike Snitzer
2025-10-20 18:24 ` Mike Snitzer
2025-10-27 13:08 ` [v6.18-rcX PATCH 0/3] nfs/localio: fixes for recent misaligned DIO changes Mike Snitzer
2025-10-27 13:08 ` [v6.18-rcX PATCH 1/3] nfs/localio: remove unecessary ENOTBLK handling in DIO WRITE support Mike Snitzer
2025-10-27 13:08 ` [v6.18-rcX PATCH 2/3] nfs/localio: add refcounting for each iocb IO associated with NFS pgio header Mike Snitzer
2025-10-27 13:19 ` Christoph Hellwig
2025-10-27 13:55 ` Mike Snitzer [this message]
2025-10-27 14:45 ` Christoph Hellwig
2025-10-27 13:08 ` [v6.18-rcX PATCH 3/3] nfs/localio: backfill missing partial read support for misaligned DIO Mike Snitzer
2025-10-27 17:52 ` [v6.18-rcX PATCH 4/3] nfs/localio: Ensure DIO WRITE's IO on stable storage upon completion Mike Snitzer
2025-10-29 23:19 ` [v6.18-rcX PATCH 5/3] nfs/localio: do not issue misaligned DIO out-of-order Mike Snitzer
2025-10-31 1:50 ` Mike Snitzer
2025-10-31 13:33 ` Anna Schumaker
2025-11-04 18:02 ` [v6.18-rcX PATCH v2] " Mike Snitzer
2025-11-06 2:50 ` Mike Snitzer
2025-11-06 3:03 ` [v6.18-rcX PATCH v3 5/3] " 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=aP95wjsM2LndIY1X@kernel.org \
--to=snitzer@kernel.org \
--cc=anna.schumaker@oracle.com \
--cc=hch@infradead.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).