From: Christoph Hellwig <hch@infradead.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>,
Pranjal Shrivastava <praan@google.com>,
Trond Myklebust <trondmy@kernel.org>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Anna Schumaker <anna@kernel.org>,
Shivaji Kant <shivajikant@google.com>,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2 6/7] nfs: Optimize direct I/O to use folios for requests
Date: Thu, 25 Jun 2026 23:56:08 -0700 [thread overview]
Message-ID: <aj4iiD5C_yyLeb3U@infradead.org> (raw)
In-Reply-To: <ajQ21kH1ZVajS2Y7@casper.infradead.org>
[sorry, dropped the ball a bit on this due to overload]
On Thu, Jun 18, 2026 at 07:20:06PM +0100, Matthew Wilcox wrote:
> On Thu, Jun 18, 2026 at 07:10:45AM -0700, Christoph Hellwig wrote:
> > On Tue, Jun 16, 2026 at 05:23:48PM +0000, Pranjal Shrivastava wrote:
> > > AFAIU, the MM subsystem explicitly ensures that every valid struct page
> > > is part of a folio.
> >
> > It is definitively not what the vision for the folio is, although if
> > I'm not mistaken it actually is still true right now.
>
> It's not true, eg, for slab. While there's still a struct page there
> for slab, there's no refcount and flags like PG_locked have different
> meanings. You'll get into a lot of trouble trying to treat slabs as
> folios (and that will include assertions tripping).
True. But also not relevant for direct I/O user pinning. If we stopped
having valid folios for anything mapped into userspace,
iov_iter_extract_bvecs would run into problems, and we had the discussion
before that at least right now it would be hard to fix.
Also if iov_iter_extract_bvecs was used on kvec or bvec iters we could
run into the slab problem. The block usage currently makes sure bvec
iters are not handed to iov_iter_extract_bvecs, but there is no such
thing for kvec vectors, although no one is using them for direct I/O
right now. Not that I'd want to rely on that in the long run.
prev parent reply other threads:[~2026-06-26 6:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260616134000.2733403-1-praan@google.com>
[not found] ` <20260616134000.2733403-7-praan@google.com>
[not found] ` <7ee3bcfdd6126c93cbb1c219bf601182b95c10d9.camel@kernel.org>
[not found] ` <ajGGpDvzZdkGtSbN@google.com>
2026-06-18 14:10 ` [PATCH v2 6/7] nfs: Optimize direct I/O to use folios for requests Christoph Hellwig
2026-06-18 18:20 ` Matthew Wilcox
2026-06-19 12:32 ` Pranjal Shrivastava
2026-06-26 6:56 ` Christoph Hellwig [this message]
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=aj4iiD5C_yyLeb3U@infradead.org \
--to=hch@infradead.org \
--cc=anna@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=praan@google.com \
--cc=shivajikant@google.com \
--cc=trondmy@kernel.org \
--cc=willy@infradead.org \
/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