Skip to content

RFC drm/amdgpu: Reduce the notifier_lock contention

Thomas Hellström dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/amdgpu: Move dma_resv waiting outside the notifier lockdrivers/gpu/drm/amd/amdgpu/amdgpu_mn.c+2 -12 replies
2/2drm/amdgpu: Use an rwsem for the notifier lockdrivers/gpu/drm/amd/amdgpu/amdgpu.h drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3 more+17 -130 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] drm/amdgpu: Reduce the notifier_lock contention

In the interest of sharing as much of possible of the userptr design, two rfc patches that are aiming to reduce the userptr notifier_lock contention.

We have these changes already in i915, but we wanted to lift them to dri- devel in the amdgpu context for discussion to make sure we don't miss anything important.

The first patch addresses the case where idling a single userptr bo for even a simple invalidation, stalls command submission across the device. Since the notifier callback is guaranteed to run to *completion* by the notifier code without a racing successful command submission, moving the fence wait out of the notifier lock should be safe.

The second patch probably has a smaller impact and might avoid some contention particularly if traversing long userptr lists. The notifier sem is also locked interruptible during command submission.

Any comments appreciated.

Cc Christian König <[email protected]>

Thomas Hellström (2):
drm/amdgpu: Move dma_resv waiting outside the notifier lock drm/amdgpu: Use an rwsem for the notifier lock

 drivers/gpu/drm/amd/amdgpu/amdgpu.h              |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c           | 12 ++++++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c       |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c           | 11 ++++++-----
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c          |  2 +-
 6 files changed, 18 insertions(+), 13 deletions(-)
Signature · 1 line
2.31.1