folio_add_file_rmap_ptes(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– folio_add_file_rmap_ptes(9) β€” like, the kernel API manual bestie πŸ’–

okay so this is a page from the Kernel API Manual, and the star of the show is folio_add_file_rmap_ptes. she's a function, she adds PTE mappings to a page range of a folio, and honestly? she ate. let's get into it 🫢


✨ NAME ✨

folio_add_file_rmap_ptes β€” add PTE mappings to a page range of a folio

like literally that's the whole vibe. adding PTE mappings. to a page range. of a folio. no cap. πŸ’…


🌸 SYNOPSIS 🌸

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

yep, that's the whole signature, character for character, don't @ me πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • folio β€” the folio we're adding the mappings to. she's the main character here πŸ‘‘
  • page β€” the first page to add. like, the beginning of the whole situation ✨
  • nr_pages β€” how many pages are gonna get mapped using PTEs. count 'em, bestie πŸ”₯
  • vma β€” the vm area where the mappings get added. that's her home turf πŸ’œ

🌈 DESCRIPTION 🌈

so the page range of the folio is defined by [page, page + nr_pages). that's the little window of pages we're talking about β€” start at page, go up to but not including page + nr_pages. classic half-open interval behavior, we love to see it 🧚

⚠️ okay this part is important: the caller needs to hold the page table lock. like, you gotta hold it. no lock, no entry. this is not optional and it's not a suggestion, it's giving "prerequisite" energy πŸ’€

⭐ SEE ALSO ⭐

okay buckle up bestie, the cross-reference list is LONG and honestly iconic. this is the kernel file ./mm/rmap.c crew 🌸:

fr fr that's the whole squad, all of them, literally every single one πŸ’–


and that's the page!! πŸŽ€ mwah πŸ’‹

this lil transmission came to you from ./mm, dated October 2026, and it's all about folio_add_file_rmap_ptes(9) β€” stay hydrated, hold your page table lock, and slay bestie πŸ¦‹βœ¨

πŸ“¦ where this page comes from