From: Mike Rapoport <rppt@kernel.org>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
"David Hildenbrand (Red Hat)" <david@kernel.org>,
Peter Xu <peterx@redhat.com>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
David Hildenbrand <david@redhat.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Muchun Song <muchun.song@linux.dev>,
Nikita Kalyazin <kalyazin@amazon.com>,
Vlastimil Babka <vbabka@suse.cz>,
Axel Rasmussen <axelrasmussen@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
James Houghton <jthoughton@google.com>,
Hugh Dickins <hughd@google.com>, Michal Hocko <mhocko@suse.com>,
Ujwal Kundur <ujwal.kundur@gmail.com>,
Oscar Salvador <osalvador@suse.de>,
Suren Baghdasaryan <surenb@google.com>,
Andrea Arcangeli <aarcange@redhat.com>,
conduct@kernel.org
Subject: Re: [PATCH v4 0/4] mm/userfaultfd: modulize memory types
Date: Tue, 11 Nov 2025 12:05:06 +0200 [thread overview]
Message-ID: <aRMKUoB/nc5A8ZMf@kernel.org> (raw)
In-Reply-To: <ulpftgdk6hgorwsrbtv2tv47b7usn3cow362knuxlzq2az2cl2@krwo6e3zxryn>
On Mon, Nov 10, 2025 at 11:34:59AM -0500, Liam R. Howlett wrote:
> * Mike Rapoport <rppt@kernel.org> [251109 02:12]:
> > On Thu, Nov 06, 2025 at 11:32:46AM -0500, Liam R. Howlett wrote:
> > > * Mike Rapoport <rppt@kernel.org> [251104 02:22]:
> > > >
> > > > It seems that "as simple as possible" can even avoid data members in struct
> > > > vm_uffd_ops, e.g something along these lines:
> > >
> > > I like this because it removes the flag.
> > >
> > > If we don't want to return the folio, we could modify the
> > > mfill_atomic_pte_continue() to __mfill_atomic_pte_continue() which takes
> > > a function pointer and have the callers pass a different get_folio() by
> > > memory type. Each memory type (anon, shmem, and guest_memfd) would have
> > > a small stub that would be set in the vm_ops.
> >
> > I'm not sure I follow you here.
> > What do you mean by "don't want to return the folio"?
>
> I didn't get this far in my prototyping, but if we have a way to service
> the minor fault for the memory types then we could use the function
> pointer as the way to change how to get the folio vs passing in a
> pointer to get/set the folio.
>
> >
> > Isn't ->minor_get_folio() is already a different get_folio() by memory
> > type?
>
> Yes. If you are dead set with handing the folio to the module, then
> this is what you do.
uffd does not hand the folio to the module, it gets it from there.
We can make it even clearer by changing minor_get_folio() declaration to
struct folio *minor_get_folio(struct inode *inode, pgoff_t pgoff);
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2025-11-11 10:05 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 23:14 [PATCH v4 0/4] mm/userfaultfd: modulize memory types Peter Xu
2025-10-14 23:14 ` [PATCH v4 1/4] mm: Introduce vm_uffd_ops API Peter Xu
2025-10-20 14:18 ` David Hildenbrand
2025-10-14 23:14 ` [PATCH v4 2/4] mm/shmem: Support " Peter Xu
2025-10-20 14:18 ` David Hildenbrand
2025-10-14 23:15 ` [PATCH v4 3/4] mm/hugetlb: " Peter Xu
2025-10-20 14:19 ` David Hildenbrand
2025-10-14 23:15 ` [PATCH v4 4/4] mm: Apply vm_uffd_ops API to core mm Peter Xu
2025-10-20 13:34 ` [PATCH v4 0/4] mm/userfaultfd: modulize memory types David Hildenbrand
2025-10-20 14:12 ` Peter Xu
2025-10-21 15:51 ` Liam R. Howlett
2025-10-21 16:28 ` Peter Xu
2025-10-30 17:13 ` Liam R. Howlett
2025-10-30 18:00 ` Nikita Kalyazin
2025-10-30 19:07 ` Peter Xu
2025-10-30 19:55 ` Peter Xu
2025-10-30 20:23 ` Lorenzo Stoakes
2025-10-30 21:13 ` Peter Xu
2025-10-30 21:27 ` Peter
2025-11-03 20:01 ` David Hildenbrand (Red Hat)
2025-11-03 20:46 ` Peter Xu
2025-11-03 21:27 ` David Hildenbrand (Red Hat)
2025-11-03 22:49 ` Peter Xu
2025-11-04 7:10 ` Lorenzo Stoakes
2025-11-04 14:18 ` David Hildenbrand (Red Hat)
2025-11-04 7:21 ` Mike Rapoport
2025-11-04 12:23 ` David Hildenbrand (Red Hat)
2025-11-06 16:32 ` Liam R. Howlett
2025-11-09 7:11 ` Mike Rapoport
2025-11-10 16:34 ` Liam R. Howlett
2025-11-11 10:05 ` Mike Rapoport [this message]
2025-10-30 20:52 ` Liam R. Howlett
2025-10-30 21:33 ` Peter Xu
2025-10-30 20:24 ` Liam R. Howlett
2025-10-30 21:26 ` Peter Xu
2025-11-03 16:11 ` Mike Rapoport
2025-11-03 18:43 ` Liam R. Howlett
2025-11-05 21:23 ` David Hildenbrand
2025-11-06 16:16 ` Liam R. Howlett
2025-11-07 10:16 ` David Hildenbrand (Red Hat)
2025-11-07 16:55 ` Liam R. Howlett
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=aRMKUoB/nc5A8ZMf@kernel.org \
--to=rppt@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=conduct@kernel.org \
--cc=david@kernel.org \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=jthoughton@google.com \
--cc=kalyazin@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=peterx@redhat.com \
--cc=surenb@google.com \
--cc=ujwal.kundur@gmail.com \
--cc=vbabka@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.