folio_dup_file_rmap_pmd(9)
π folio_dup_file_rmap_pmd(9) π
okay so bestie, welcome to the Kernel API Manual page for folio_dup_file_rmap_pmd β yes it's a mouthful, yes it's iconic, and yes we're gonna get through it together π«Ά
β¨ NAME β¨
folio_dup_file_rmap_pmd β duplicating a PMD mapping of a page range of a folio. that's the whole vibe. no cap. π¦
πΈ SYNOPSIS πΈ
void folio_dup_file_rmap_pmd (struct folio *folio , struct page *page ,
struct vm_area_struct *dst_vma );
literally just copy that exactly, don't be cute with it π
π ARGUMENTS π
folioβ the folio you're duplicating the mapping of. the main character of this whole situation πpageβ the first page whose mapping you're duplicating. like, the starting point, the origin story β¨dst_vmaβ the destination vm area. where the mapping is headed, iykyk π
π¦ DESCRIPTION π¦
so the page range of the folio is defined by:
[page, page + HPAGE_PMD_NR)
that's your span, that's your window, that's the whole range bestie π―
β οΈ the caller needs to hold the page table lock. like, fr fr, hold it. don't skip this, this is not a drill π
β SEE ALSO β
kernel file ./include/linux/rmap.h and honestly the whole friend group:
folio_dup_file_rmap_ptes(9)folio_try_dup_anon_rmap_ptes(9)folio_try_dup_anon_rmap_pmd(9)folio_try_share_anon_rmap_pte(9)folio_try_share_anon_rmap_pmd(9)page_vma_mapped_walk_restart(9)
and that's the page!! π this one lives over in ./include/linux, dated October 2026, and it's signed folio_dup_file_rmap_pmd(9) β slay, go forth and duplicate those mappings 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