Re: [PATCH 02/16] mm: introduce leaf entry type and use to simplify leaf entry logic
From: Lorenzo Stoakes
Date: Wed Nov 05 2025 - 14:55:47 EST
On Wed, Nov 05, 2025 at 02:16:48PM -0400, Jason Gunthorpe wrote:
> On Wed, Nov 05, 2025 at 05:32:29PM +0000, Lorenzo Stoakes wrote:
>
> > Obviously heavily influenced by your great feedback, but I really did try to
> > build it in a way that tried to simplify as much as possible.
>
> My main remark, and it is not something you should necessarily do
> anything about, but pte_none() can be given a consistent name too:
>
> leafent_is_none_pte(pte)
>
> Which is definted to be identical to:
>
> leafent_is_none(leafent_from_pte(pte))
>
> But presumably faster.
>
> Jason
Hm one nitpicky thing with this is I have tended to use pte_ or pmd_ prefixes
for pte/pmd _tests_, as leafent_xxx() ultimately either deals with leaf entries
or results in a leaf entry.
I do get the desire to get away from the pte_none() stuff though :) The fact we
wrap up none entries in to leaf entries goes a long way towards this in any case
I think! :)
Cheers, Lorenzo