[PATCH v1 22/29] mm/page-flags: rename PAGE_MAPPING_MOVABLE to PAGE_MAPPING_ANON_KSM

Lorenzo Stoakes lorenzo.stoakes at oracle.com
Wed Jul 2 19:06:58 AEST 2025


On Tue, Jul 01, 2025 at 09:31:56PM +0200, David Hildenbrand wrote:
> On 01.07.25 14:54, Lorenzo Stoakes wrote:
> > On Mon, Jun 30, 2025 at 03:00:03PM +0200, David Hildenbrand wrote:
> > > KSM is the only remaining user, let's rename the flag. While at it,
> > > adjust to remaining page -> folio in the doc.
> >
> > Hm I wonder if we could just ideally have this be a separate flag rather than a
> > bitwise combination, however I bet there's code that does somehow rely on this.
>
> Well, KSM folios are anon folios, so that must hold.

Right, of course, though they're sort of 'special' anon folios...

>
> Of course, now you could make folio_test_anon() test both bits, and have KSM
> folios only set a PAGE_MAPPING_KSM bit.
>
> That should be possible on top of this change, but not sure if that's really
> what we want. After all, KSM folios are special ANON folios.

Yeah probably best to keep to enforce that KSM == anon.

>
> >
> > I know for sure there's code that has to do a folio_test_ksm() on something
> > folio_test_anon()'d because the latter isn't sufficient.
> > > But this is one for the future I guess :)
>
> Yes :)
>
> >
> > Nice: re change to folio, that is a nice cleanup based on fact you've now made
> > the per-page mapping op stuff not be part of this.
> >
> > >
> > > Reviewed-by: Zi Yan <ziy at nvidia.com>
> > > Signed-off-by: David Hildenbrand <david at redhat.com>
> >
> > LGTM, so:
> >
> > Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes at oracle.com>
>
> Thanks!
>
>
> --
> Cheers,
>
> David / dhildenb
>


More information about the Linuxppc-dev mailing list