folio_dup_file_rmap_pmd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


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