Skip to content

Commit

Permalink
drm/amdgpu: Checkpoint and Restore VRAM BOs without VA
Browse files Browse the repository at this point in the history
Extend checkpoint logic to allow inclusion of VRAM BOs that
do not have a VA attached

Signed-off-by: Ramesh Errabolu <Ramesh.Errabolu@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Ramesh Errabolu authored and Alex Deucher committed Jul 27, 2023
1 parent 952ee94 commit 6d67b68
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,7 @@ static uint32_t get_process_num_bos(struct kfd_process *p)
idr_for_each_entry(&pdd->alloc_idr, mem, id) {
struct kgd_mem *kgd_mem = (struct kgd_mem *)mem;

if ((uint64_t)kgd_mem->va > pdd->gpuvm_base)
if (!kgd_mem->va || kgd_mem->va > pdd->gpuvm_base)
num_of_bos++;
}
}
Expand Down Expand Up @@ -1918,7 +1918,11 @@ static int criu_checkpoint_bos(struct kfd_process *p,
kgd_mem = (struct kgd_mem *)mem;
dumper_bo = kgd_mem->bo;

if ((uint64_t)kgd_mem->va <= pdd->gpuvm_base)
/* Skip checkpointing BOs that are used for Trap handler
* code and state. Currently, these BOs have a VA that
* is less GPUVM Base
*/
if (kgd_mem->va && kgd_mem->va <= pdd->gpuvm_base)
continue;

bo_bucket = &bo_buckets[bo_index];
Expand Down

0 comments on commit 6d67b68

Please sign in to comment.