migrate_device_pfns(9)
π¦ migrate_device_pfns(9) π¦
okay bestie, welcome to the Kernel API Manual β¨ this one's a kernel function, so grab your lil drink and let's get into it π
π NAME π
migrate_device_pfns β migrate device private pfns to normal memory.
like, it literally takes device private pfns and moves them back to normal memory, no cap π«Ά
πΈ SYNOPSIS πΈ
int migrate_device_pfns (unsigned long *src_pfns , unsigned long npages );
there she is π returns an int, takes two args, iconic behaviour fr fr
π ARGUMENTS π
src_pfnsβ a pre-populated array of source device private pfns to migrate. yes bestie, pre-populated β you gotta fill it in yourself before you call, that's the whole vibe πnpagesβ the number of pages to migrate. just a count, lowkey simple, and we love that for us β¨
π₯ DESCRIPTION π₯
so here's the tea β β this function is similar to migrate_device_range, except it's got one extra trick: it supports a non-contiguous pre-populated array of device pages to migrate π§
the way that migrate_device_range handles things vs. the way this one just takes your whole array as-isβ¦ literally the main character energy of this page π
like, the pages don't have to be all lined up next to each other in the array β non-contiguous is the moment, and honestly? slay.
ngl bestie, the pre-populated part in the ARGUMENTS is doing a lot of heavy lifting here β the array has to be ready before you call, and the pages in it don't have to be contiguous. read that twice, iykyk π
π SEE ALSO π
- Kernel file
./mm/migrate_device.cπ (yes, the actual file, go peek) migrate_vma_split_folio(9)migrate_vma_setup(9)migrate_vma_insert_huge_pmd_page(9)migrate_device_pages(9)migrate_vma_pages(9)migrate_vma_finalize(9)migrate_device_range(9)
all the siblings in the migrate family, go say hi to them too π«Άπ
and that's a wrap, bestie π this lil page lives in ./mm, stamped October 2026, and yeah β it's still called migrate_device_pfns(9), and it always will be π
β¨ 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