svm_migrate_..._memory_gart(9)
π svm_migrate_..._memory_gart(9) β Kernel API Manual π
okay bestie, welcome to the svm_migrate_..._memory_gart(9) page β that's the title, and the manual name is Kernel API Manual. this is the kernel API glow-up for the sdma migration copy situation, and we're keeping every detail because that's the vibe. periodt. π
π NAME π
svm_migrate_copy_memory_gart β sdma copy data between ram and vram. iconic behavior, no notes. β¨
β¨ SYNOPSIS β¨
int svm_migrate_copy_memory_gart (struct amdgpu_device *adev ,
dma_addr_t *sys , u64 *vram , u64 npages , enum MIGRATION_COPY_DIR
direction , struct dma_fence **mfence );
πΈ ARGUMENTS πΈ
adevβ the amdgpu device the sdma ring is running. main character device energy. πsysβ system DMA pointer to be copied. yes bestie, that one. π«Άvramβ vram destination DMA pointer. the destination is giving destination. πnpagesβ number of pages to copy. count 'em. π’directionβenum MIGRATION_COPY_DIR. that's the enum, exactly like that. π¦mfenceβ output, sdma fence to signal after sdma is done. it's literally the output fence situation. β
π¦ DESCRIPTION π¦
okay so here's the whole deal: the ram address uses GART table continuous entries mapping to ram pages, and the vram address uses direct mapping of vram pages β those vram pages must have npages number of continuous pages. no cap. π
GART update and sdma use the same buf copy function ring, sdma is splited to multiple GTT_MAX_PAGES transfer, all sdma operations are serialized, and you wait for the last sdma finish fence β which is returned β to check copy memory is done. that's the entire pipeline, bestie. don't skip the serialized part. π₯
π CONTEXT π
Process context β that's the context. that's it. that's the whole context section. π
π RETURN π
0 β OK, otherwise error code. so like, 0 is the slay outcome, and anything else is an error code. π
π SEE ALSO π
- Kernel file:
./drivers/gpu/drm/amd/amdkfd/kfd_migrate.c svm_migrate_copy_done(9)svm_migrate_ram_to_vram(9)svm_migrate_vma_to_ram(9)svm_migrate_vram_to_ram(9)svm_migrate_vram_to_vram(9)svm_migrate_to_ram(9)
and that's the whole page, bestie β source/version: ./drivers/gpu/drm/amd/amdkfd, date: October 2026, page handle: svm_migrate_..._memory_gart(9). mwah π
π
π¦ 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