zap_vma_range_batched(9)
π zap_vma_range_batched(9) β the kernel API manual, bestie edition π
okay so this is a page from the Kernel API Manual and honestly? she's a baddie. sit down, grab a strawberry drink π, and let's talk about zap_vma_range_batched β the girl who literally deletes page table entries in a vma range for a living. no cap.
β¨ SYNOPSIS β¨
void zap_vma_range_batched (struct mmu_gather *tlb , struct
vm_area_struct *vma , unsigned long address , unsigned long size ,
struct zap_details *details );
look at her. five arguments, returns nothing, causes chaos. main character energy fr π
πΈ ARGUMENTS πΈ
tlbβ pointer to the caller'sstruct mmu_gather. yes bestie, yours, she's just borrowing it π«Άvmaβ the vma covering the range to zap. the neighborhood she's about to redecorateaddressβ starting address of the range to zap. where the demolition starts πsizeβ number of bytes to zap. how much she's taking out. iconic, honestlydetailsβ details specifying zapping behavior. the vibe check parameters π
π DESCRIPTION π
Okay so first thing first: tlb must not be NULL. that's not a suggestion, that's the law. no NULL tlb, periodt. π«
And the provided address range must be fully contained within vma β like, the whole range, inside the vma, no overhang, no sneaking out the sides. she is not flexible about this. π
Now the fun part: if vma is for hugetlb, tlb is flushed and re-initialized by this function. so she doesn't just use your tlb, she resets it. rebuild era. π₯
And if details is NULL? this function will zap all page table entries. all of them. every single one. she's not picky, she's thorough. π
π¦ SEE ALSO π¦
squad goals, all of them, in exactly this order, no substitutions π€
Kernel file ./mm/memory.c β 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(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), set_pte_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)
like, that's the whole group chat. π
quick reminder bestie: NULLtlb= not allowed, range outsidevma= not allowed. she will not be nice about it. π§
and that's the page!! brought to you by ./mm, October 2026 edition β mwah, love u, go zap responsibly π
β¨π
π¦ 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