Re: [PATCH] docs: pagemap: fix flags location, member name and sample code
From: Zenghui Yu
Date: Fri Jun 26 2026 - 12:08:31 EST
On 6/26/26 10:47 PM, David Hildenbrand (Arm) wrote:
> On 6/25/26 19:44, Zenghui Yu wrote:
> > The userland visible page flags (KPF_*) were initially moved to
> > include/linux/kernel-page-flags.h in commit 1a9b5b7fe0c5 ("mm: export
> > stable page flags"), and later moved to
> > include/uapi/linux/kernel-page-flags.h in commit 607ca46e97a1 ("UAPI:
> > (Scripted) Disintegrate include/linux"). Upadte the doc to reflect the
>
> s/Upadte/Update/
>
> > current location of these flags.
>
> Ack
>
> >
> > The member @walk_end of struct pm_scan_arg {} was wrongly written as
> > "end_walk".
>
> Ack
>
> >
> > The first sample code of the PAGEMAP_SCAN ioctl wrongly used the
> > PM_SCAN_CHECK_WPASYNC flag twice, instead of the PM_SCAN_WP_MATCHING flag.
>
> That makes sense.
>
> > The second one missed PAGE_IS_FILE in the required mask.
>
> Hm. The description says: "Find pages which have been written, are file backed,
> not swapped and either present or huge".
>
> But doesn't that mean that
>
> it should actually be
>
> .category_mask = PAGE_IS_WRITTEN | PAGE_IS_FILE,
>
> Because
>
> .category_inverted = PAGE_IS_SWAPPED,
Ah! Thanks for pointing it out. I'll fix it soon.
Thanks,
Zenghui