migrate_device_pfns(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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 🌈

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