All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] drm/i915: Asynchronous vma unbinding
@ 2022-01-03 11:59 ` Thomas Hellström
  0 siblings, 0 replies; 26+ messages in thread
From: Thomas Hellström @ 2022-01-03 11:59 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld

This patch series introduces infrastructure for asynchronous vma
unbinding. The single enabled use-case is initially at buffer object
migration where we otherwise sync when unbinding vmas before migration.
This in theory allows us to pipeline any number of migrations, but in
practice the number is restricted by a sync wait when filling the
migration context ring. We might want to look at that moving forward if
needed.

The other main use-case is to be able to pipeline vma evictions, for
example with softpinning where a new vma wants to reuse the vm range
of an already active vma. We can't support this just yet because we
need dma_resv locking around vma eviction for that, which is under
implementation.

Patch 1 introduces vma resource first for error capture purposes.
Patch 2 changes the vm backend interface to take vma resources rather than vmas,
Patch 3 introduces the async unbinding itself, and finally
Patch 4 realizes we have duplicated functionality and removes the vma snapshots.

v2:
-- Some kernel test robot reports addressed.
-- kmem cache for vma resources, See patch 6
-- Various fixes all over the place. See separate commit messages.
v3:
-- Re-add a missing i915_vma_resource_put()
-- Remove a stray debug printout
v4:
-- Patch series split in two. This is the second part.
-- Take cache coloring into account when searching for vma_resources
   pengind unbind. (Matthew Auld)

Thomas Hellström (4):
  drm/i915: Initial introduction of vma resources
  drm/i915: Use the vma resource as argument for gtt binding / unbinding
  drm/i915: Use vma resources for async unbinding
  drm/i915: Use struct vma_resource instead of struct vma_snapshot

 drivers/gpu/drm/i915/Makefile                 |   2 +-
 drivers/gpu/drm/i915/display/intel_dpt.c      |  27 +-
 .../gpu/drm/i915/gem/i915_gem_execbuffer.c    |  17 +-
 .../gpu/drm/i915/gem/i915_gem_object_types.h  |  27 +-
 drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c  |  11 +-
 .../gpu/drm/i915/gem/selftests/huge_pages.c   |  37 +-
 drivers/gpu/drm/i915/gt/gen6_ppgtt.c          |  19 +-
 drivers/gpu/drm/i915/gt/gen8_ppgtt.c          |  37 +-
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |   9 +-
 drivers/gpu/drm/i915/gt/intel_ggtt.c          |  72 +--
 drivers/gpu/drm/i915/gt/intel_gtt.c           |   4 +
 drivers/gpu/drm/i915/gt/intel_gtt.h           |  19 +-
 drivers/gpu/drm/i915/gt/intel_ppgtt.c         |  22 +-
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c      |  13 +-
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h      |   2 +-
 drivers/gpu/drm/i915/i915_debugfs.c           |   3 +-
 drivers/gpu/drm/i915/i915_drv.h               |   1 +
 drivers/gpu/drm/i915/i915_gem.c               |  12 +-
 drivers/gpu/drm/i915/i915_gpu_error.c         |  87 ++--
 drivers/gpu/drm/i915/i915_module.c            |   3 +
 drivers/gpu/drm/i915/i915_request.c           |  12 +-
 drivers/gpu/drm/i915/i915_request.h           |   6 +-
 drivers/gpu/drm/i915/i915_vma.c               | 227 +++++++++-
 drivers/gpu/drm/i915/i915_vma.h               |  33 +-
 drivers/gpu/drm/i915/i915_vma_resource.c      | 417 ++++++++++++++++++
 drivers/gpu/drm/i915/i915_vma_resource.h      | 235 ++++++++++
 drivers/gpu/drm/i915/i915_vma_snapshot.c      | 134 ------
 drivers/gpu/drm/i915/i915_vma_snapshot.h      | 112 -----
 drivers/gpu/drm/i915/i915_vma_types.h         |   5 +
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 159 ++++---
 drivers/gpu/drm/i915/selftests/mock_gtt.c     |  12 +-
 31 files changed, 1215 insertions(+), 561 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_vma_resource.c
 create mode 100644 drivers/gpu/drm/i915/i915_vma_resource.h
 delete mode 100644 drivers/gpu/drm/i915/i915_vma_snapshot.c
 delete mode 100644 drivers/gpu/drm/i915/i915_vma_snapshot.h

-- 
2.31.1


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

end of thread, other threads:[~2022-01-05 17:59 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 11:59 [PATCH v4 0/4] drm/i915: Asynchronous vma unbinding Thomas Hellström
2022-01-03 11:59 ` [Intel-gfx] " Thomas Hellström
2022-01-03 11:59 ` [PATCH v4 1/4] drm/i915: Initial introduction of vma resources Thomas Hellström
2022-01-03 11:59   ` [Intel-gfx] " Thomas Hellström
2022-01-03 11:59 ` [PATCH v4 2/4] drm/i915: Use the vma resource as argument for gtt binding / unbinding Thomas Hellström
2022-01-03 11:59   ` [Intel-gfx] " Thomas Hellström
2022-01-03 18:17   ` Zeng, Oak
2022-01-03 18:17     ` Zeng, Oak
2022-01-03 18:57     ` Thomas Hellström
2022-01-03 23:08       ` Zeng, Oak
2022-01-03 23:08         ` Zeng, Oak
2022-01-04  8:29         ` Thomas Hellström
2022-01-04 15:35           ` Zeng, Oak
2022-01-04 15:35             ` Zeng, Oak
2022-01-04 16:07             ` Thomas Hellström
2022-01-05 13:44               ` Thomas Hellström
2022-01-05 17:59                 ` Zeng, Oak
2022-01-05 17:59                   ` Zeng, Oak
2022-01-03 11:59 ` [PATCH v4 3/4] drm/i915: Use vma resources for async unbinding Thomas Hellström
2022-01-03 11:59   ` [Intel-gfx] " Thomas Hellström
2022-01-03 11:59 ` [PATCH v4 4/4] drm/i915: Use struct vma_resource instead of struct vma_snapshot Thomas Hellström
2022-01-03 11:59   ` [Intel-gfx] " Thomas Hellström
2022-01-03 12:41 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Asynchronous vma unbinding (rev4) Patchwork
2022-01-03 12:43 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-01-03 13:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-01-03 16:12 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.