diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2021-03-17 00:24:12 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-04-20 21:48:43 -0400 |
commit | 48ff079b28d82dbce000cc45c0fd35b6ae9ffbda (patch) | |
tree | 02ff15ece3c28e3af18c2b9ded1acf8cb41420eb /drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | |
parent | 0b0e518d61af8e1cb73cbbfb313b215640c8a6f3 (diff) | |
download | linux-48ff079b28d82dbce000cc45c0fd35b6ae9ffbda.tar.gz linux-48ff079b28d82dbce000cc45c0fd35b6ae9ffbda.tar.bz2 linux-48ff079b28d82dbce000cc45c0fd35b6ae9ffbda.zip |
drm/amdkfd: HMM migrate vram to ram
If CPU page fault happens, HMM pgmap_ops callback migrate_to_ram start
migrate memory from vram to ram in steps:
1. migrate_vma_pages get vram pages, and notify HMM to invalidate the
pages, HMM interval notifier callback evict process queues
2. Allocate system memory pages
3. Use svm copy memory to migrate data from vram to ram
4. migrate_vma_pages copy pages structure from vram pages to ram pages
5. Return VM_FAULT_SIGBUS if migration failed, to notify application
6. migrate_vma_finalize put vram pages, page_free callback free vram
pages and vram nodes
7. Restore work wait for migration is finished, then update GPU page
table mapping to system memory, and resume process queues
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
0 files changed, 0 insertions, 0 deletions