migrate_vma_...uge_pmd_page(9)
π migrate_vma_...uge_pmd_page(9) β Kernel API Manual, but make it make sense
okay so bestie, welcome to the Kernel API Manual page for migrate_vma_insert_huge_pmd_page(9) β yes the title is truncated with ... and no we're not fixing it, that's just how the man page header do. π
β¨ NAME β¨
migrate_vma_insert_huge_pmd_page β Insert a huge folio into @migrate->vma->vm_mm at @addr. The folio is already allocated as a part of the migration process with large page. literally that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
int migrate_vma_insert_huge_pmd_page (struct migrate_vma *migrate ,
unsigned long addr , struct page *page , unsigned long *src , pmd_t
*pmdp );
like, five arguments, returns an int, she's serving signature realness β¨
π ARGUMENTS π
migrateβ themigrate_vmaarguments. the whole context package, the main character of the call fr fr.addrβ address where the folio will be inserted. this is where the magic happens πpageβ page to be inserted ataddr. she's the one being placed, no cap.srcβ src pfn which is being migrated. the origin story π«pmdpβ pointer to the pmd. handle with care bestie π«Ά
π₯ DESCRIPTION π₯
so page needs to be initialized and setup after it's allocated. not optional, not a suggestion β she has to be ready before she gets inserted. π
The code bits here follow closely the code in __do_huge_pmd_anonymous_page. like, closely closely. if you know that function, you already know the vibe iykyk π
β οΈ big important caveat: This API does not support THP zero pages. that's a hard no, not a "maybe later". don't come for her about it. π
π SEE ALSO π
Kernel file ./mm/migrate_device.c β and the whole friend group:
migrate_vma_split_folio(9)migrate_vma_setup(9)migrate_device_pages(9)migrate_vma_pages(9)migrate_vma_finalize(9)migrate_device_range(9)migrate_device_pfns(9)
they ate tbh. go read them. πβ¨
and that's the page!! ππ¦π brought to you straight out of ./mm, dated October 2026, still titled migrate_vma_...uge_pmd_page(9) because the ellipsis is iconic and we respect the lore. periodt. ππ
π¦ 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