hugetlb_vme...estore_folio(9)
π¦ hugetlb_vme...estore_folio(9) π¦
okay bestie, so this is from the Kernel API Manual β yes, the actual kernel, we're being that girl today π
β¨ NAME β¨
hugetlb_vmemmap_restore_folio β the glow-up-reversal function π it restores vmemmap pages that were previously optimized (by hugetlb_vmemmap_optimize_folio()), and those pages get reallocated and remapped. like, un-slimming them, but make it kernel π
πΈ SYNOPSIS πΈ
int hugetlb_vmemmap_restore_folio (const struct hstate *h , struct folio *folio );
π ARGUMENTS π
hβ astruct hstate. that's it, that's the whole description, she's lowkey mysterious like that π«Άfolioβ the folio whose vmemmap pages will be restored. the main character of this whole operation ngl π
β RETURN β
0 if folio's vmemmap pages have been reallocated and remapped π― β and a negative error code otherwise. so like, zero is the slay outcome, negatives are the "oop π" outcome.
fr fr, check that return value. 0 good, negative not good. no cap.
π SEE ALSO π
- Kernel file
./mm/hugetlb_vmemmap.cβ the source, go read her π struct vmemmap_remap_walk(9)vmemmap_remap_split(9)vmemmap_remap_free(9)vmemmap_remap_alloc(9)hugetlb_vmemmap_restore_folios(9)β yes plural, she has a sister π―ββοΈhugetlb_vmemmap_optimize_folio(9)β the one who did the optimizing in the first place, the og π
and that's the page bestie, we ate and left zero crumbs π mwah π
sign-off szn: this lil beauty lives in ./mm and she was dated October 2026 β iconic, timeless, ahead of her time πβ¨ no thoughts, just hugetlb_vme...estore_folio(9) π¦π
π¦ 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