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:57:13 EST


On Wed, Nov 05, 2025 at 07:06:11PM +0000, Matthew Wilcox wrote:
> On Mon, Nov 03, 2025 at 12:31:43PM +0000, Lorenzo Stoakes wrote:
> > The kernel maintains leaf page table entries which contain either:
> >
> > - Nothing ('none' entries)
> > - Present entries (that is stuff the hardware can navigate without fault)
> > - Everything else that will cause a fault which the kernel handles
>
> The problem is that we're already using 'pmd leaf entries' to mean "this
> is a pointer to a PMD entry rather than a table of PTEs". So I think
> we need a new name. A boring name would be 'swent' (software entry).
> An acronym would be SWE. In the XArray I distinguish between pointer
> entries and value entries -- would calling them value entries work here?
> Or we could call them something entirely different. Say 'twig'. Or
> 'cask'.
>

Yeah as discussed off-list I do concede 'leaf entry' is overloaded
vs. hardware leaf entries, I just found the idea of sw_leaf_entry_t a bit
gross and unclear.

Of course we now add a new ambiguity with this as really we do mean
software leaf entry.

How about:

soft_leaf_t

softleaf_xxx()

?

Cheers, Lorenzo