folio_can_map_prot_numa(9)
π folio_can_map_prot_numa β like, the vibe check for prot NUMA mapping
okay so bestie, welcome to the Kernel API Manual β¨ this one's a little function from ./mm and honestly? she's a gatekeeper. let's get into it.
πΈ NAME πΈ
folio_can_map_prot_numa β the function that checks whether the folio can map prot numa. literally its whole job. no cap.
β¨ SYNOPSIS β¨
bool folio_can_map_prot_numa (struct folio *folio , struct
vm_area_struct *vma , bool is_private_single_threaded );
she returns a bool, she takes three args, and she's judging your folio. periodt.
π ARGUMENTS π
folioβ the folio whose mapping is being considered for being made NUMA hintable. yes, that's the actual wording, this is her moment, we're considering her for hintability πvmaβ the VMA that the folio belongs to. her home, her context, her main character energy.is_private_single_threadedβ is this a single-threaded private VMA or not? just a yes/no, but make it fashion π¦
π₯ DESCRIPTION π₯
so what does she actually do? she checks to see if the folio actually indicates that we need to make the mapping one which causes a NUMA hinting fault π
because ngl, there are cases where it's simply unnecessary β and in those cases, no fault, no drama. and when prot numa is needed, the folio's access time is adjusted for memory tiering. the way that she just... tidies up behind the scenes. iconic. π
β RETURN β
- True if the mapping of the folio needs to be changed π
- false otherwise π
that's it. that's the whole return. clean, simple, ate.
π«Ά SEE ALSO π«Ά
kernel file ./mm/mempolicy.c and her whole friend group:
numa_nearest_node(9)nearest_node_nodemask(9)alloc_pages_mpol(9)vma_alloc_folio(9)alloc_pages(9)mpol_misplaced(9)mpol_shared_policy_init(9)mpol_parse_str(9)mpol_to_str(9)
go read them all fr fr, they're giving encyclopedia but make it slay π
and that's the page bestie!! brought to you by ./mm on October 2026 β mwah, go forth and map responsibly π§π
π¦ 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