Hi Christian,
patches 1-8 and 10 are your VM rework. The other four are fixes found
while testing it with KFD SVM on top:
1. patch 09: amdgpu_vm_pt_alloc() leaks the new PT BO when the
allocation succeeds but the VM is evicting once the critical section
is re-entered. Release the unpublished BO, keep the critical section
owned by the caller.
2. patch 11: amdgpu_vm_pt_leaves() always updated cursor.parent->bo, so
a walk stopping at an allocated PTB wrote a PDE in the parent instead
of the PTEs in the leaf. Use the entry's own BO and level, and go
through amdgpu_vm_pte_update_flags().
3. patch 12: both callers passed an inclusive last address, but
amdgpu_vm_pt_leaves() works on a half-open range. That dropped the
last page in amdgpu_vm_unmap_range(), and made amdgpu_vm_handle_fault()
skip the loop entirely, so AMDGPU_VM_NORETRY_FLAGS were never written
and the wave kept retrying.
4. patch 13: for a redirect to the dummy hierarchy above the PTE level
the entry points to the next-level dummy PD/PT, but
amdgpu_vm_pte_update_flags() treats everything above PTB as a leaf and
applies AMDGPU_PDE_PTE_FLAG(). Encode it with
amdgpu_gmc_get_pde_for_bo() instead.
One question on patch 13: it special cases the dummy PDE inside
amdgpu_vm_pt_leaves(), which adds a second update path next to
amdgpu_vm_pte_update_flags(). The alternatives are to let
amdgpu_vm_pte_update_flags() encode a directory entry when the level is
not AMDGPU_VM_PTB, or to pass already encoded dummy PDEs in dst[] from
amdgpu_vm_handle_fault(). Which one do you prefer?
Thanks,
Yu
Christian König (9):
drm/amdgpu: start to move VM internals into amdgpu_vm_internal.h
drm/amdgpu: remove unecessary parameters from
trace_amdgpu_vm_update_ptes
drm/amdgpu: allocate and fill dummy PDs/PTs
drm/amdgpu: add amdgpu_vm_pt_leaves()
drm/amdgpu: drop immediate updates from amdgpu_vm_update_range
drm/amdgpu: split amdgpu_vm_update_range
drm/amdgpu: nuke most amdgpu_vm_eviction_(try)lock uses
drm/amdgpu: rework eviction lock handling into critical section v2
drm/amdgpu: fix the HMM range handling for KFD SVM
Yu Huang (4):
drm/amdgpu: free PT when VM critical section cannot resume
drm/amdgpu: update the PTB itself in amdgpu_vm_pt_leaves()
drm/amdgpu: pass an exclusive end to amdgpu_vm_pt_leaves()
drm/amdgpu: use directory flags for dummy PDEs
--
2.53.0