public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] drm/amdgpu: Reduce the notifier_lock contention
@ 2021-10-07 13:26 Thomas Hellström
  2021-10-07 13:26 ` [RFC PATCH 1/2] drm/amdgpu: Move dma_resv waiting outside the notifier lock Thomas Hellström
  2021-10-07 13:26 ` [RFC PATCH 2/2] drm/amdgpu: Use an rwsem for " Thomas Hellström
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Hellström @ 2021-10-07 13:26 UTC (permalink / raw)
  To: dri-devel; +Cc: Thomas Hellström, Christian König

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 <christian.koenig@amd.com>

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(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-08  6:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-07 13:26 [RFC PATCH 0/2] drm/amdgpu: Reduce the notifier_lock contention Thomas Hellström
2021-10-07 13:26 ` [RFC PATCH 1/2] drm/amdgpu: Move dma_resv waiting outside the notifier lock Thomas Hellström
2021-10-07 14:57   ` Christian König
2021-10-08  6:43     ` Thomas Hellström
2021-10-07 13:26 ` [RFC PATCH 2/2] drm/amdgpu: Use an rwsem for " Thomas Hellström

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox