On 2026-11-18 13:52, Benjamin Cheng wrote:
> In [1] I originally wanted to just stop using amdgpu_bo_fence. However
> while attempting to address Christian's comment about reserving the
> fences upfront when the PD is locked, I realized that there are many
> places that are not reserving enough fences in the worst-case.
>
> I went through and audited every lock of the VM root PD and I think I
> have caught everything missing fence reservations in this series. I
> have lightly tested this and didn't see any issues, and in general
> this is reserving more fences than the typical case so it shouldn't
> cause any BUG_ONs.
>
> Patch 1 through 3 here are the reservation fixes. Basically since we
> started enabling more clear/move entities to be used, we should be
> reserving the worst-case space upfront. Also when the TLB flush fence
> was added we did not add reserve space for it.
>
> Patch 4 and 5 are cleanups that I found (not everywhere locking the PD
> does validation or VM updates), and patches 6 through 8 are the
> amdgpu_bo_fence() removal series from [1].
>
> [1]: 
> https://lore.kernel.org/amd-gfx/[email protected]/
>
> Benjamin Cheng (8):
>   drm/amdgpu/vm: reserve more fences in amdgpu_vm_lock_pd
>   drm/amdgpu/dma_buf: reserve AMDGPU_VM_UPDATE_FENCES for move_notify
>   drm/amdgpu/vm: reserve AMDGPU_VM_UPDATE_FENCES for handle_fault
>   drm/amdgpu: reserve only what the caller asks for in lock_pd
>   drm/amdgpu/userq: remove extra fence request when locking PD
>   drm/amdgpu/vm: stop using amdgpu_bo_fence
>   drm/amdgpu/uvd: stop using amdgpu_bo_fence
>   drm/amdgpu/object: get rid of amdgpu_bo_fence

Sorry, please disregard this series. I forgot two patches, sending them out 
shortly...

>
>  .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c  | 13 ++++++----
>  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c        |  3 ++-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c   |  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c       |  5 ++--
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c    | 25 -------------------
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.h    |  2 --
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c    | 12 +++++----
>  drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c     |  6 ++---
>  .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c   |  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c       | 17 ++++++++++---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c        | 14 ++++++-----
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h        |  8 ++++++
>  drivers/gpu/drm/amd/amdgpu/mes_userqueue.c    |  2 +-
>  drivers/gpu/drm/amd/amdkfd/kfd_svm.c          |  3 ++-
>  14 files changed, 58 insertions(+), 56 deletions(-)
>

Reply via email to