sync_with_folio_pmd_zap(9)
πΈ NAME πΈ
okay so bestie, this is sync_with_folio_pmd_zap(9) from the Kernel API Manual β and itβs literally here to sync with concurrent zapping of a folio PMD. thatβs the whole vibe. π
β¨
β¨ SYNOPSIS β¨
void sync_with_folio_pmd_zap (struct mm_struct *mm , pmd_t *pmdp );
π ARGUMENTS π
mmβ themm_struct. yes bestie, that one. π«Άpmdpβ pointer to the pmd that was found to bepmd_none. π
π¦ DESCRIPTION π¦
okay so picture this: youβre unmapping a folio and youβre not holding the PTL, and you find a pmd_none. at that exact moment, zap_huge_pmd may have already cleared the PMD but not yet modified the folio to say βhey, Iβm unmapped.β π
if you just skip the PMD without synchronization, the folio unmapping code could assume that unmapping failed. not the vibe. so what do you do? you wait for concurrent zapping to complete by grabbing the PTL. periodt. π
π SEE ALSO π
Kernel file ./mm/internal.h β all the section 9 besties:
folio_pte_batch_flags(9)pte_move_swp_offset(9)pte_next_swp_offset(9)swap_pte_batch(9)folio_evictable(9)vma_filebacked_address(9)vma_anon_address(9)
okay thatβs the page, bestie π source/version: ./mm Β· date: October 2026 Β· and yes, itβs sync_with_folio_pmd_zap(9) π«Άπ
π¦ 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