page_vma_map...walk_restart(9)
π page_vma_map...walk_restart(9) β the kernel API manual, bestie edition β¨
okay so this is one of those little kernel API pages (section 9 of the manual, iykyk) and honestly? she's short but she's important. let's get into it π«Ά
πΈ NAME πΈ
page_vma_mapped_walk_restart β literally just restart the page table walk. that's the whole vibe. π₯
β¨ SYNOPSIS β¨
void page_vma_mapped_walk_restart (struct page_vma_mapped_walk *pvmw );
no return value, she just does the thing and leaves. main character energy honestly π
π ARGUMENTS π
pvmwβ a pointer tostruct page_vma_mapped_walk. that's it, that's the whole argument list. one girl, one pointer, one job π¦
π DESCRIPTION π
so here's the situation: sometimes stuff changes in the page table mid-walk β like when a PMD gets split (yes, mid-walk, messy π). when that happens, you gotta restart the page table walk, and that's exactly what this function is for.
what she does, in order, because we love a checklist:
- makes sure the PTL (that's the page table lock, bestie) held during the previous walk is released β no holding onto locks you don't need, we don't do that here π
- resets the state so a brand new walk can start
- that new walk starts at the current address stored in
pvmw->addressβ not from the top, from right where you're at. efficient. iconic. periodt β
so like... it's giving "clean slate, but same address." π
π SEE ALSO π
kernel file ./include/linux/rmap.h, and honestly the whole rmap fam is here:
folio_dup_file_rmap_ptes(9)folio_dup_file_rmap_pmd(9)folio_try_dup_anon_rmap_ptes(9)folio_try_dup_anon_rmap_pmd(9)folio_try_share_anon_rmap_pte(9)folio_try_share_anon_rmap_pmd(9)
go read those too, they're all slay in their own way π
ngl this one's a small page but it's load-bearing β if you're walking page tables and the table shifts under you, this is your girl. treat her right π
okay that's the whole page!! sign-off time: this one lives in ./include/linux, dated October 2026, and it's page_vma_map...walk_restart(9) β the truncated name is not a typo bestie, that's just how the header renders it π ily, go split a PMD 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