Re: [RFC PATCH 05/12] fs/proc/task_mmu: refactor pagemap_pmd_range()

Jason Gunthorpe
2025-10-27T16:11:49Z

On Fri, Oct 24, 2025 at 04:37:18PM -0400, Gregory Price wrote:
> On Fri, Oct 24, 2025 at 09:15:59PM +0100, Lorenzo Stoakes wrote:
> > On Fri, Oct 24, 2025 at 03:12:08PM -0400, Gregory Price wrote:
> >
> > So maybe actually that isn't too bad of an idea...
> >
> > Could also be
> >
> > nonpresent_or_swap_t but that's kinda icky...
>
> clearly we need:
>
> union {
> swp_entry_t swap;
> nonpresent_entry_t np;
> pony_entry_t pony;
> plum_emtry_t beer;
> } leaf_entry_t;
>
> with
>
> leaf_type whats_that_pte(leaf_entry_t);

I think if you are going to try to rename swp_entry_t that is a pretty
good idea. Maybe swleaf_entry_t to pace emphasis that it is not used
by the HW page table walker would be a good compromise to the ugly
'non-present entry' term.

Jason