STRUCT VMEMMAP_REMAP_WALK(9)
π¦ 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);) andVMEMMAP_REMAP_NO_TLB_FLUSH(BIT(1);) π₯
π SEE ALSO π
Kernel file ./mm/hugetlb_vmemmap.c β plus these besties:
vmemmap_remap_split(9)vmemmap_remap_free(9)vmemmap_remap_alloc(9)hugetlb_vmemmap_restore_folio(9)hugetlb_vmemmap_restore_folios(9)hugetlb_vmemmap_optimize_folio(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms