mpol_misplaced(9)
π NAME π
okay so this page is all about mpol_misplaced(9) from the Kernel API Manual, and the whole point is to check whether current folio node is valid in policy. slay. π
β¨ SYNOPSIS β¨
int mpol_misplaced (struct folio *folio , struct vm_fault *vmf ,
unsigned long addr );
π ARGUMENTS π
folioβ the folio to be checked, bestie πvmfβ structure describing the fault, literally the fault loreaddrβ virtual address in vma for shared policy lookup and interleave policy
π¦ DESCRIPTION π¦
So here's the vibe: it lookups the current policy node id for vma,addr and then βcompare toβ folio's node id. Policy determination βmimicsβ alloc_page_vma. It's called from fault path where we know the vma and faulting address. iykyk. β¨
πΈ RETURN πΈ
It returns NUMA_NO_NODE if the page is in a node that is valid for this policy, or a suitable node ID to allocate a replacement folio from. periodt. π
π SEE ALSO π
- Kernel file
./mm/mempolicy.c numa_nearest_node(9)nearest_node_nodemask(9)folio_can_map_prot_numa(9)alloc_pages_mpol(9)vma_alloc_folio(9)alloc_pages(9)mpol_shared_policy_init(9)mpol_parse_str(9)mpol_to_str(9)
okay bye bestie π«Ά β this one comes from source/version ./mm, dated October 2026. mwah πβ¨
π¦ 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