Re: [PATCH v3 5/6] mm: gup: introduce gup_unshared_pages()
From: Yeoreum Yun
Date: Tue Nov 10 2026 - 05:17:02 EST
Hi Rik,
> On Mon, 2026-11-09 at 12:32 +0000, Yeoreum Yun wrote:
> > This is preparatory patch to make gup_fast_pte_range() batchable.
> >
> > Introduce gup_unshared_pages() to count consecutive pages within a
> > folio
> > that do not require unsharing, and use it to implement
> > gup_must_unshare().
> >
> Could gup_exclusive_pages() be a better name?
Yes. This seems much better for me. I'll change it in next-spin.
>
> The code all looks good, though.
Thanks!
>
> > Also add a folio argument to gup_must_unshare() so callers can reuse
> > an
> > existing folio and avoid the compound_head() call implicit in
> > PageAnon().
>
> Does that count as a functional change? ;)
Right. I think it would be better to remove below sentence.
>
> >
> > There is no functional change.
> >
> > Signed-off-by: Yeoreum Yun <yeoreum.yun@xxxxxxx>
>
> Reviewed-by: Rik van Riel <riel@xxxxxxxxxxx>
Thanks! :)
--
Sincerely,
Yeoreum Yun