From: Hugh Dickins <hughd@google.com>
To: Kiryl Shutsemau <kirill@shutemov.name>
Cc: David Hildenbrand <david@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Yang Shi <shy828301@gmail.com>,
Dave Chinner <david@fromorbit.com>,
Suren Baghdasaryan <surenb@google.com>,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/filemap: Implement fast short reads
Date: Mon, 27 Oct 2025 03:49:12 -0700 (PDT) [thread overview]
Message-ID: <b8e56515-3903-068c-e4bd-fc0ca5c30d94@google.com> (raw)
In-Reply-To: <CAHbLzkpx7iv40Tt+CDpbSsOupkGXKcix0wfiF6cVGrLFe0dvRQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1815 bytes --]
On Thu, 23 Oct 2025, Yang Shi wrote:
> On Thu, Oct 23, 2025 at 3:34 AM Kiryl Shutsemau <kirill@shutemov.name> wrote:
> >
> > On Wed, Oct 22, 2025 at 07:28:27PM +0200, David Hildenbrand wrote:
> > > "garbage" as in pointing at something without a direct map, something that's
> > > protected differently (MTE? weird CoCo protection?) or even worse MMIO with
> > > undesired read-effects.
> >
> > Pedro already points to the problem with missing direct mapping.
> > _nofault() copy should help with this.
> >
> > Can direct mapping ever be converted to MMIO? It can be converted to DMA
> > buffer (which is fine), but MMIO? I have not seen it even in virtualized
> > environments.
> >
> > I cannot say for all CoCo protections, but TDX guest shared<->private
> > should be fine.
> >
> > I am not sure about MTE. Is there a way to bypass MTE check for a load?
> > And how does it deal with stray reads from load_unaligned_zeropad()?
>
> If I remember correctly, _nofault() copy should skip tag check too.
>
> Thanks,
> Yang
Not a reply to Yang, I'm just tacking on to the latest mail...
I sew no mention of page migration: __folio_migrate_mapping() does
not use page_cache_delete(), so would surely need to do its own
write_seqcount_begin() and _end(), wouldn't it?
It is using folio_ref_freeze() and _unfreeze(), thinking that
keeps everyone else safely away: but not filemap_read_fast_rcu().
And all other users of folio_ref_freeze() (probably not many but
I have not searched) need to be checked too: maybe no others need
changing, but that has to be established.
This makes a fundamental change to speculative page cache assumptions.
My own opinion was expressed very much better than I could,
by Dave Chinner on Oct 21: cognitive load of niche fastpath.
Hugh
next prev parent reply other threads:[~2025-10-27 10:49 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 14:15 [PATCH] mm/filemap: Implement fast short reads Kiryl Shutsemau
2025-10-18 2:38 ` kernel test robot
2025-10-18 3:54 ` kernel test robot
2025-10-18 4:46 ` kernel test robot
2025-10-18 17:56 ` Linus Torvalds
2025-10-20 11:03 ` Kiryl Shutsemau
2025-10-20 4:53 ` Andrew Morton
2025-10-20 11:33 ` Kiryl Shutsemau
2025-10-21 15:50 ` Linus Torvalds
2025-10-21 23:39 ` Dave Chinner
2025-10-22 4:25 ` Linus Torvalds
2025-10-22 8:00 ` Dave Chinner
2025-10-22 15:31 ` Linus Torvalds
2025-10-23 7:50 ` Dave Chinner
2025-10-23 9:37 ` Jan Kara
2025-10-21 15:47 ` Linus Torvalds
2025-10-22 7:08 ` Pedro Falcato
2025-10-22 7:13 ` Linus Torvalds
2025-10-22 7:38 ` Pedro Falcato
2025-10-22 10:00 ` Kiryl Shutsemau
2025-10-22 17:28 ` David Hildenbrand
2025-10-23 10:31 ` Kiryl Shutsemau
2025-10-23 10:54 ` David Hildenbrand
2025-10-23 11:09 ` Kiryl Shutsemau
2025-10-23 12:08 ` David Hildenbrand
2025-10-23 11:10 ` David Hildenbrand
2025-10-23 11:11 ` David Hildenbrand
2025-10-23 11:40 ` Kiryl Shutsemau
2025-10-23 11:49 ` David Hildenbrand
2025-10-23 12:41 ` Kiryl Shutsemau
2025-10-23 17:42 ` Yang Shi
2025-10-27 10:49 ` Hugh Dickins [this message]
2025-10-27 15:50 ` Linus Torvalds
2025-10-27 16:06 ` David Hildenbrand
2025-10-27 16:48 ` Linus Torvalds
2025-10-27 16:53 ` David Hildenbrand
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=b8e56515-3903-068c-e4bd-fc0ca5c30d94@google.com \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=david@fromorbit.com \
--cc=david@redhat.com \
--cc=jack@suse.cz \
--cc=kirill@shutemov.name \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shy828301@gmail.com \
--cc=surenb@google.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--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;
as well as URLs for NNTP newsgroup(s).