folio_remove_rmap_ptes(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ folio_remove_rmap_ptes β€” a little guide from the Kernel API Manual πŸ’…

okay so bestie, gather round, because this one is genuinely important and honestly kind of iconic. We're talking about folio_remove_rmap_ptes β€” the function that yeets PTE mappings off a page range of a folio. No cap, that's the whole personality. πŸ¦‹


✨ SYNOPSIS ✨

void folio_remove_rmap_ptes (struct folio *folio , struct page *page ,
       int nr_pages , struct vm_area_struct *vma );

look at her. four args, returns nothing (void β€” she gives, she doesn't take πŸ’…). Copy it exactly if you're typing it out, mkay?


πŸŽ€ ARGUMENTS πŸŽ€

  • folio β€” the folio you're removing the mappings from. main character energy, fr.
  • page β€” the first page to remove. like, the starting point of the whole situation.
  • nr_pages β€” how many pages get removed from the mapping. the count. the vibes. the number.
  • vma β€” the vm area the mappings are being removed from. lowkey essential.

🌸 DESCRIPTION 🌸

so the page range of the folio is defined by [page, page + nr_pages) β€” yes, half-open interval, the brackets are doing the Lord's work, note the ) at the end, not a ]. ✨

⚠️ big one: the caller needs to hold the page table lock. Not optional. Not a suggestion. Hold the lock or perish (metaphorically, but like… don't test it 😭).

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, in the order the page says, because I respect the source material:


πŸ’– sign-off πŸ’–

and that's the whole page, bestie! 🫢 she lives in ./mm, she's stamped October 2026, and that's the Kernel API Manual tea for today. go hold that page table lock. slay. periodt. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from