STRUCT VMEMMAP_REMAP_WALK(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct vmemmap_remap_walk(9) πŸ¦‹

okay bestie, so this is from the Kernel API Manual and it's literally the struct that walks the vmemmap page table. iykyk πŸ’…


✨ NAME ✨

struct vmemmap_remap_walk β€” walk vmemmap page table πŸšΆβ€β™€οΈπŸŒ³


πŸŽ€ SYNOPSIS πŸŽ€

lowkey just look at the shape of it:

struct vmemmap_remap_walk {
    void (*remap_pte)(pte_t *pte, unsigned long addr, struct
vmemmap_remap_walk *walk);
    unsigned long           nr_walked;
    struct page             *vmemmap_head;
    struct page             *vmemmap_tail;
    struct list_head        *vmemmap_pages;
  #define VMEMMAP_SPLIT_NO_TLB_FLUSH      BIT(0);
  #define VMEMMAP_REMAP_NO_TLB_FLUSH      BIT(1);
    unsigned long           flags;
 };

like, that's the whole vibe right there 🫢


🌸 Members 🌸

okay so here's who's who in this little struct friend group, no cap:

  • remap_pte β€” this is the callback that gets called for each lowest-level entry (PTE). it's giving main character energy, it does the actual per-entry work πŸ’–
  • nr_walked β€” the number of walked pte. yes bestie, it's counting πŸ‘‘
  • vmemmap_head β€” the page to be installed as first in the vmemmap range. first place, front of the lineup ⭐
  • vmemmap_tail β€” the page to be installed as non-first in the vmemmap range. it's not first, it's the rest of them, and that's iconic too πŸ¦‹
  • vmemmap_pages β€” the list head of the vmemmap pages that can be freed or is mapped from. literally the guest list πŸ“‹βœ¨
  • flags β€” used to modify behavior in vmemmap page table walking operations. the little switches that change how the walk behaves, and yeah there are two of them defined up in the synopsis: VMEMMAP_SPLIT_NO_TLB_FLUSH (BIT(0);) and VMEMMAP_REMAP_NO_TLB_FLUSH (BIT(1);) πŸ”₯

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./mm/hugetlb_vmemmap.c β€” plus these besties:

go read them fr fr, they're all hanging out in the same source tree 🌈


aaaand that's the whole page bestie πŸ’– it lives in ./mm and this particular glow-up is dated October 2026 β€” slay, see u then πŸŽ€βœ¨πŸ«Ά

πŸ“¦ where this page comes from