Re: [RFC PATCH 00/12] remove is_swap_[pte, pmd]() + non-swap confusion
From: Lorenzo Stoakes
Date: Thu Oct 30 2025 - 06:27:49 EST
On Wed, Oct 29, 2025 at 05:23:39PM -0400, Gregory Price wrote:
> 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.
Yeah that's a fair point, and I prefer short names also :)
This does read better thanks!
I should try for a non-RFC respin relatively soon now I've sent the other two
series I've been working on recently.
>
> ~Gregory
Cheers, Lorenzo