svm_migrate_ram_to_vram(9)
π svm_migrate_ram_to_vram(9)
okay so bestie, welcome to the Kernel API Manual β yes that's the manual name, we're in the big-leagues kernel docs now β¨
πΈ NAME πΈ
svm_migrate_ram_to_vram β bestie this literally migrates an svm range from system memory to device memory, and ngl that's the whole vibe π¦
β¨ SYNOPSIS β¨
int svm_migrate_ram_to_vram (struct svm_range *prange , uint32_t
best_loc , unsigned long start_mgr , unsigned long last_mgr , struct
mm_struct *mm , uint32_t trigger );
like, that's the whole signature, no cap β copy it exactly bestie π
π ARGUMENTS π
prangeβ the range structure, the main character of this whole operation πbest_locβ the device we're migrating to, i.e. the destination of the whole glow-up π¦start_mgrβ start page to migrate, where the journey begins πΈlast_mgrβ last page to migrate, where the journey ends πmmβ the processmmstructure, yes that one, the memory-map one πtriggerβ the reason of migration, like why are we doing this, what's the lore π
π₯ CONTEXT π₯
So here's the thing bestie β this runs in process context, and the caller has to hold the mmap read lock, the svms lock, and the prange lock. All three. Not optional. The way that's non-negotiable fr fr π
bestie do NOT call this without holding all three locks, that's giving undefined-behaviour disaster energy π
β RETURN β
0 β OK, slay, it worked π
otherwise β an error code, so like, it didn't work, and you get to find out why π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/amd/amdkfd/kfd_migrate.cβ the source, iykyk π svm_migrate_copy_memory_gart(9)svm_migrate_copy_done(9)svm_migrate_vma_to_ram(9)svm_migrate_vram_to_ram(9)svm_migrate_vram_to_vram(9)svm_migrate_to_ram(9)
like, the whole migrate friend group, obsessed π«Ά
and that's the page bestie!! π it lives under ./drivers/gpu/drm/amd/amdkfd, and this lil edition is dated October 2026 β see you in the next svm_migrate_ram_to_vram(9) era, 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