hugetlb_vmem...store_folios(9)
π¦ hugetlb_vmemmap_restore_folios(9) β the Kernel API Manual page, but make it make sense π
okay so bestie, we're in the Kernel API Manual today and the star of the show is hugetlb_vmemmap_restore_folios(9). yes the name is long. yes it's giving "I have a lot of syllables and I'm not sorry." but it's literally so important, so let's get into it π«Ά
β¨ NAME β¨
hugetlb_vmemmap_restore_folios β restore vmemmap for every single folio on the list. every. one. no folio left behind, periodt π
π SYNOPSIS π
long hugetlb_vmemmap_restore_folios (const struct hstate *h ,
struct list_head *folio_list ,
struct list_head *non_hvo_folios );
look at her. three args, one long return, absolute main character energy π₯
πΈ ARGUMENTS πΈ
hβ thehstate. that's it, that's the whole vibe. it's the hstate, girl πfolio_listβ a list of folios. the lineup. the guest list. the whole squad πnon_hvo_foliosβ an output list of folios for which vmemmap exists. so this one's not an input, she's a β¨resultβ¨ β you hand her over and she gets filled up π
π RETURN π
so what do you get back? two possible moods:
- the number of folios for which vmemmap was restored β
- an error code, if an error was encountered restoring vmemmap for a folio π
and here's the tea, bestie, because the side effects are the whole plot π«:
- folios that have vmemmap get moved to the
non_hvo_folioslist π¦ - processing of entries stops when the first error is encountered. like, full stop. no cap π
- the folio that experienced the error and all the non-processed folios will remain on
folio_list. they stay. they're not going anywhere π
okay so lowkey the important bit: a failure doesn't clear out your list. the error folio and everything after it are still sitting on folio_list, so don't go assuming it's empty. that's the vibe check and it passed β
π SEE ALSO π
- Kernel file
./mm/hugetlb_vmemmap.cπ struct vmemmap_remap_walk(9)vmemmap_remap_split(9)vmemmap_remap_free(9)vmemmap_remap_alloc(9)hugetlb_vmemmap_restore_folio(9)hugetlb_vmemmap_optimize_folio(9)
the whole friend group fr fr π«Ά go read them, iykyk π
and that's the page!! this one's chillin' in ./mm, dated October 2026, and she goes by hugetlb_vmem...store_folios(9) in the manual β yes the title's abbreviated, she's mysterious like that π§β¨ bye bestie, slay your vmemmap π
π¦ 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