drm/amdgpu: fixes for the VM critical section and page fault rework
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest13 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | drm/amdgpu: start to move VM internals into amdgpu_vm_internal.hdrivers/ drivers/ drivers/ +5 more | +162 | 1 reply | |
| 2/13 | drm/amdgpu: remove unecessary parameters from trace_amdgpu_vm_update_ptesdrivers/ drivers/ | +6 | 1 reply | |
| 3/13 | drm/amdgpu: allocate and fill dummy PDs/PTsdrivers/ drivers/ drivers/ +1 more | +73 | 1 reply | |
| 4/13 | drm/amdgpu: add amdgpu_vm_pt_leaves()drivers/ drivers/ drivers/ | +105 | 1 reply | |
| 5/13 | drm/amdgpu: drop immediate updates from amdgpu_vm_update_rangedrivers/ drivers/ drivers/ +2 more | +24 | 0 replies | |
| 6/13 | drm/amdgpu: split amdgpu_vm_update_rangedrivers/ drivers/ drivers/ +2 more | +120 | 0 replies | |
| 7/13 | drm/amdgpu: nuke most amdgpu_vm_eviction_(try)lock usesdrivers/ drivers/ | +12 | 0 replies | |
| 8/13 | drm/amdgpu: rework eviction lock handling into critical section v2drivers/ drivers/ drivers/ +1 more | +58 | 0 replies | |
| 9/13 | drm/amdgpu: free PT when VM critical section cannot resumedrivers/ | +6 | 0 replies | |
| 10/13 | drm/amdgpu: fix the HMM range handling for KFD SVMdrivers/ drivers/ drivers/ +1 more | +34 | 0 replies | |
| 11/13 | drm/amdgpu: update the PTB itself in amdgpu_vm_pt_leaves()drivers/ | +15 | 0 replies | |
| 12/13 | drm/amdgpu: pass an exclusive end to amdgpu_vm_pt_leaves()drivers/ | +2 | 0 replies | |
| 13/13 | drm/amdgpu: use directory flags for dummy PDEsdrivers/ | +27 | 0 replies |
Reviews trailers per patch
3 of 13 patches have a Reviewed-by or Acked-by.
| Patch | Yu Huang | Timur Kristóf |
|---|---|---|
| 1/13 | R-b | |
| 2/13 | R-b | |
| 3/13 | R-b | |
| 4/13 | ||
| 5/13 | ||
| 6/13 | ||
| 7/13 | ||
| 8/13 | ||
| 9/13 | ||
| 10/13 | ||
| 11/13 | ||
| 12/13 | ||
| 13/13 | Authored-by |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/13] drm/amdgpu: fixes for the VM critical section and page fault rework
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
Signature · 1 line
2.53.0