sync_with_folio_pmd_zap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 β€” the mm_struct. yes bestie, that one. 🫢
  • pmdp β€” pointer to the pmd that was found to be pmd_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:


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