set_pte_range(9)
π set_pte_range β the kernel API manual, bestie edition π
okay so real talk: this one lives in the Kernel API Manual, section 9, and it's called set_pte_range. Buckle up, it's giving page-table glow-up β¨
πΈ NAME πΈ
set_pte_range β literally sets a whole range of PTEs so they point at pages inside one folio. no cap, that's the whole vibe π
π¦ SYNOPSIS π¦
void set_pte_range (struct vm_fault *vmf , struct folio *folio , struct
page *page , unsigned int nr , unsigned long addr );
look at her. iconic signature. let's break down every single piece π«Ά
π ARGUMENTS π
vmfβ the fault description. yep, the whole fault situation, described π«folioβ the folio that containspage. she's the big container energy πpageβ the first page you're making a PTE for. like, the beginning of the era πnrβ how many PTEs you wanna create. the count. the quantity. the amount, periodt π’addrβ the first address you're making a PTE for. starting point, main character address π
ngl, rememberpageis the first page andaddris the first address β those "first"s are doing heavy lifting so don't skip 'em π
π SEE ALSO π
okay this is the part where she name-drops everyone. it's in the kernel file ./mm/memory.c, and the whole friend group is:
free_pgd_range(9)free_pgtables(9)__vm_normal_page(9)vm_normal_page(9)vm_normal_folio(9)vm_normal_page_pmd(9)vm_normal_folio_pmd(9)vm_normal_page_pud(9)restore_exclusive_pte(9)cond_install_uffd_wp_ptes(9)zap_vma_for_reaping(9)unmap_vmas(9)zap_vma_range_batched(9)zap_vma_range(9)zap_special_vma_range(9)vm_insert_pages(9)vm_insert_page(9)vm_map_pages(9)vm_map_pages_zero(9)vmf_insert_pfn_prot(9)vmf_insert_pfn(9)remap_pfn_range(9)vm_iomap_memory(9)__vmf_anon_prepare(9)finish_mkwrite_fault(9)unmap_mapping_folio(9)unmap_mapping_pages(9)unmap_mapping_range(9)finish_fault(9)mm_account_fault(9)follow_pfnmap_start(9)follow_pfnmap_end(9)generic_access_phys(9)access_remote_vm(9)copy_remote_vm_str(9)folio_zero_user(9)
that's the whole squad, bestie. iykyk π§π
β¨ cute little sign-off β¨ this page is from the ./mm source tree and it's dated October 2026 β so yeah, she's future-fresh, and the manual name is set_pte_range, section 9, one more time for the people in the back πππ¦
π¦ 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