Re: [PATCH v3 5/6] mm: gup: introduce gup_unshared_pages()

From: Rik van Riel

Date: Tue Nov 10 2026 - 15:31:40 EST


On Tue, 2026-11-10 at 20:19 +0000, Yeoreum Yun wrote:
> On Tue, Nov 10, 2026 at 02:21:18PM -0500, Rik van Riel wrote:
> > On Tue, 2026-11-10 at 14:04 +0100, David Hildenbrand (Arm) wrote:
> > >
> > > So it's all about "number of pages that don't need unsharing".
> > >
> > gup_no_unshare_len() ?
> >
> > a little awkward sounding, but it describes
> > what it's doing?
>
> Hmm, Wouldn't this name be semantically much the same as keeping
> the existing gup_unshared_page(), since both essentially convey that
> no unsharing is required from GUP's perspective?

The function measures how many pages in
this current interval do not need to be
unshared.

I'm happy with any name, though.

I would really like to just see this
code go in, so I can post my two
GUP series on top, first the batching
for the GUP-slow path, and then the
series that allows access_remote_vm()
and friends to work under the per-VMA
lock.

--
All Rights Reversed.