Re: [PATCH v2] mm/memfd_luo: don't use memfd_pin_folios()

From: Mike Rapoport

Date: Wed Nov 11 2026 - 03:07:22 EST


On Tue, Nov 10, 2026 at 06:38:06PM +0100, Pratyush Yadav wrote:
> On Wed, Nov 04 2026, Mike Rapoport wrote:
>
> >> +/*
> >> + * Move a folio out of ZONE_MOVABLE or CMA, so it can be held until the next
> >
> > "held until next kernel" - here and below - I feel that something is off
> > here, but can't pinpoint what exactly.
>
> Hmm, perhaps this:
>
> Preservation holds a longterm reference on the folio. This would
> block migration in ZONE_MOVABLE or CMA. Move it out.
>
> ?
>
> >
> >> + * kernel. Called with a reference on the unlocked folio, which is always
> >> + * dropped. The caller must look up the folio again afterwards.
> >
> > I'm having hard time parsing "called with a reference" sentence :)
>
> What about this:
>
> Must be called with folio unlocked. Drops the reference to folio.
> The caller must look it up again.

Ack for both :)

> --
> Regards,
> Pratyush Yadav

--
Sincerely yours,
Mike.