softleaf_t(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ softleaf_t(9) β€” Kernel API Manual πŸ¦‹

okay bestie, you're looking at softleaf_t(9) and honestly? it's giving "quietly iconic kernel typedef" and i'm obsessed πŸ’… let's get into it.


πŸŽ€ NAME πŸŽ€

typedef softleaf_t β€” describes a page table software leaf entry, abstracted away from its architecture-specific encoding. periodt.


✨ Description ✨

so like, page table leaf entries are the ones that don't point at any descendent page tables. instead they either:

  • reference a data page,
  • are an empty entry (a 'none' entry, iykyk), or
  • contain a non-present entry.

if the entry references another page table or a data page, then it's pertinent to hardware β€” meaning it literally tells the hardware how to decode the page table entry. main character energy, truly πŸ”₯

otherwise? it's a software-defined leaf page table entry, and that's the kind this type describes. go look at leafops.h, and specifically softleaf_type, for a list of all the possible kinds of software leaf entry. no cap, it's all there πŸ’–

a softleaf_t entry is abstracted from the hardware page table entry, so it is not architecture-specific. slay, portability 🫢


πŸ’€ NOTE πŸ’€

while we transition away from the confusing swp_entry_t type that used to be used for this purpose, we simply alias this type. this will be removed once the transition is complete. so yeah β€” enjoy it while it lasts, it's on borrowed time 😭


🌸 SEE ALSO 🌸

  • Kernel file ./include/linux/mm_types.h struct folio(9)
  • struct ptdesc(9)
  • vm_fault_t(9)
  • enum vm_fault_reason(9)
  • enum fault_flag(9)

and that's the vibe check, bestie 🧚✨ this whole thing lives in ./include/linux, dated October 2026, and it's filed under softleaf_t(9) β€” go forth and read your page tables with confidence, you've got this πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from