[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aGWYrrFJCg219Y8R@x1.local>
Date: Wed, 2 Jul 2025 16:38:06 -0400
From: Peter Xu <peterx@...hat.com>
To: Mike Rapoport <rppt@...nel.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Vlastimil Babka <vbabka@...e.cz>,
Suren Baghdasaryan <surenb@...gle.com>,
Muchun Song <muchun.song@...ux.dev>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Hugh Dickins <hughd@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
James Houghton <jthoughton@...gle.com>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>,
Nikita Kalyazin <kalyazin@...zon.com>,
Michal Hocko <mhocko@...e.com>,
David Hildenbrand <david@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Oscar Salvador <osalvador@...e.de>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Ujwal Kundur <ujwal.kundur@...il.com>
Subject: Re: [PATCH v2 4/4] mm: Apply vm_uffd_ops API to core mm
On Sun, Jun 29, 2025 at 11:55:27AM +0300, Mike Rapoport wrote:
> On Fri, Jun 27, 2025 at 11:46:55AM -0400, Peter Xu wrote:
> > This patch completely moves the old userfaultfd core to use the new
> > vm_uffd_ops API. After this change, existing file systems will start to
> > use the new API for userfault operations.
>
> Maybe:
>
> Move userfaultfd core to use new vm_uffd_ops API. After this change file
> systems that implement vm_operations_struct can start using new API for
> userfaultfd operations.
Sure.
>
> > When at it, moving vma_can_userfault() into mm/userfaultfd.c instead,
> > because it's getting too big. It's only used in slow paths so it shouldn't
> > be an issue. Move the pte marker check before wp_async, which might be
> > more intuitive because wp_async depends on pte markers. That shouldn't
> > cause any functional change though because only one check would take effect
> > depending on whether pte marker was selected in config.
> >
> > This will also remove quite some hard-coded checks for either shmem or
> > hugetlbfs. Now all the old checks should still work but with vm_uffd_ops.
> >
> > Note that anonymous memory will still need to be processed separately
> > because it doesn't have vm_ops at all.
> >
> > Reviewed-by: James Houghton <jthoughton@...gle.com>
> > Signed-off-by: Peter Xu <peterx@...hat.com>
>
> Acked-by: Mike Rapoport (Microsoft) <rppt@...nel.org>
I'll take this for now, thanks. We can finish the discussion in patch 1 to
see whether we need to refine the API.
--
Peter Xu
Powered by blists - more mailing lists