folio_remove_rmap_pmd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… folio_remove_rmap_pmd β€” like, the whole kernel API manual vibe ✨

okay so bestie, welcome to the Kernel API Manual πŸŽ€ β€” yes, that's the manual name, we're doing this properly β€” and today's main character is folio_remove_rmap_pmd(9). Buckle up πŸ¦‹


✨ NAME ✨

folio_remove_rmap_pmd β€” removes a PMD mapping from a page range of a folio πŸ’… no cap, that's literally the whole job


🌸 SYNOPSIS 🌸

void folio_remove_rmap_pmd (struct folio *folio , struct page *page ,
       struct vm_area_struct *vma );

that's it, that's the signature, copy it exactly bestie 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • folio β€” the folio we're removing the mapping from, like, the star of the show πŸ‘‘
  • page β€” the first page to remove. first one. the beginning. the main character of the range 🌟
  • vma β€” the vm area from which the mapping is removed, iykyk πŸ¦‹

⭐ DESCRIPTION ⭐

okay so the page range of the folio is defined by [page, page + HPAGE_PMD_NR) β€” that's the range, that's the math, don't come for me πŸ”₯

🚨 real talk: the caller needs to hold the page table lock. like, actually. not optionally. hold the lock, bestie, or it's giving undefined behaviour energy πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

because we're thorough and we link everything fr fr β€” all from the kernel file ./mm/rmap.c:


and that's the page!! πŸ§šβ€β™€οΈ she lives in ./mm, she's dated October 2026, and she's filed under folio_remove_rmap_pmd(9) β€” mwah, slay, periodt πŸ’œπŸŽ€

πŸ“¦ where this page comes from