[PATCH 0/7] Fix amdgpu_vm_pt_free warning
Philip Yang
Philip.Yang at amd.com
Fri Sep 16 15:05:03 UTC 2022
When SVM range is unmapped from CPU, the mmu notifier callback update
GPU page table to unmap the SVM range from GPU, this is the unlocked
page table update context as we cannot take vm reservation lock. If
unmapping from GPU free pt bo, this cause warning as vm reservation lock
is not hold.
To fix the warning/race issue, we schedule pt_free_work to free pt bo.
This has another race to remove vm_bo entry from vm status lists. Some
of the vm status lists are protected by vm invalidate lock and the rest
of lists are protected by vm reservation lock.
The purpose of this patch series is to use one vm status_lock to protect
all vm status lists, and use it in pt_free_work to fix the race and
remove the warning.
Philip Yang (7):
drm/amdgpu: Rename vm invalidate lock to status_lock
drm/amdgpu: Use vm status_lock to protect relocated list
drm/amdgpu: Use vm status_lock to protect vm idle list
drm/amdgpu: Use vm status_lock to protect vm moved list
drm/amdgpu: Use vm status_lock to protect vm evicted list
drm/amdgpu: Use vm status_lock to protect pt free
drm/amdgpu: Fix amdgpu_vm_pt_free warning
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 97 ++++++++++++++++-------
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 9 ++-
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 44 +++++++++-
3 files changed, 117 insertions(+), 33 deletions(-)
--
2.35.1
More information about the amd-gfx
mailing list