Re: [RFC PATCH 00/12] remove is_swap_[pte, pmd]() + non-swap confusion

Gregory Price
2025-10-29T21:23:43Z

On Wed, Oct 29, 2025 at 07:09:59PM +0000, Lorenzo Stoakes wrote:
> >
> > pmd_is_leaf_or_leafent()
> >
> > In the PTE API we are calling present entries that are address, not
> > tables, leafs.
>
> Hmm I think pmd_is_present_or_leafent() is clearer actually on second
> thoughts :)
>

apologies if misunderstanding, but I like short names :]

#define pmd_exists(entry) (pmd_is_present() || pmd_is_leafent())

If you care about what that entry is, you'll have to spell out these
checks in your code anyway, so no need to explode the naming to include
everything that might be there.

~Gregory