migrate_vma_...uge_pmd_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” the migrate_vma arguments. 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 at addr. 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:

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