From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
matthew.auld@intel.com
Subject: [Intel-gfx] [PATCH v4 0/6] drm/i915/ttm: Async migration
Date: Thu, 18 Nov 2021 14:02:24 +0100 [thread overview]
Message-ID: <20211118130230.154988-1-thomas.hellstrom@linux.intel.com> (raw)
This patch series deals with async migration and async vram management.
It still leaves an important part out, which is async unbinding which
will reduce latency further, at least when trying to migrate already active
objects.
Patches 1/6 deals with accessing and waiting for the TTM moving
fence from i915 GEM.
Patch 2 is pure code reorganization, no functional change.
Patch 3 breaks a refcounting loop involving the TTM moving fence.
Patch 4 makes the i915 TTM shinking code handle async moves.
Patch 5 uses TTM to implement the ttm move() callback async, it also
introduces a utility to collect dependencies and turn them into a
single dma_fence, which is needed for the intel_migrate code.
This also affects the gem object migrate code.
Patch 6 makes the object copy utility async as well, mainly for future
users since the only current user, suspend backup and restore, typically
will want to sync anyway.
v2:
- Fix a couple of SPARSE warnings.
v3:
- Fix a NULL pointer dereference.
v4:
- Squash what was previously patch 1 and 2 to patch1
- Ditch the moving fence waiting in i915_vma_pin_iomap()
- Rework how the refcounting loop is broken in patch 3. Drop region
reference counting.
- Break what is now patch 4 out of patch 5. Add support for avoiding
waiting for gpu when shrinking.
- A number of changes in patch 5. See the commit message for details.
Maarten Lankhorst (1):
drm/i915: Add support for moving fence waiting
Thomas Hellström (5):
drm/i915/ttm: Move the i915_gem_obj_copy_ttm() function
drm/i915/ttm: Drop region reference counting
drm/i915/ttm: Correctly handle waiting for gpu when shrinking
drm/i915/ttm: Implement asynchronous TTM moves
drm/i915/ttm: Update i915_gem_obj_copy_ttm() to be asynchronous
drivers/gpu/drm/i915/gem/i915_gem_object.c | 52 +++
drivers/gpu/drm/i915/gem/i915_gem_object.h | 6 +
.../gpu/drm/i915/gem/i915_gem_object_types.h | 1 +
drivers/gpu/drm/i915/gem/i915_gem_pages.c | 6 +
drivers/gpu/drm/i915/gem/i915_gem_region.c | 4 +-
drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 3 +-
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 1 +
drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 6 +-
drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 89 ++--
drivers/gpu/drm/i915/gem/i915_gem_ttm.h | 6 +-
drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 405 ++++++++++++++++--
drivers/gpu/drm/i915/gem/i915_gem_ttm_move.h | 10 +-
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c | 3 +
drivers/gpu/drm/i915/gem/i915_gem_wait.c | 4 +-
.../gpu/drm/i915/gem/selftests/huge_pages.c | 2 +-
drivers/gpu/drm/i915/gt/intel_region_lmem.c | 10 +-
drivers/gpu/drm/i915/i915_vma.c | 36 +-
drivers/gpu/drm/i915/intel_memory_region.c | 26 +-
drivers/gpu/drm/i915/intel_memory_region.h | 9 +-
drivers/gpu/drm/i915/intel_region_ttm.c | 35 +-
drivers/gpu/drm/i915/intel_region_ttm.h | 2 +-
.../drm/i915/selftests/intel_memory_region.c | 8 +-
drivers/gpu/drm/i915/selftests/mock_region.c | 7 +-
23 files changed, 588 insertions(+), 143 deletions(-)
--
2.31.1
next reply other threads:[~2021-11-18 13:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 13:02 Thomas Hellström [this message]
2021-11-18 13:02 ` [Intel-gfx] [PATCH v4 1/6] drm/i915: Add support for moving fence waiting Thomas Hellström
2021-11-18 14:12 ` Matthew Auld
2021-11-20 9:09 ` kernel test robot
2021-11-18 13:02 ` [Intel-gfx] [PATCH v4 2/6] drm/i915/ttm: Move the i915_gem_obj_copy_ttm() function Thomas Hellström
2021-11-18 13:02 ` [Intel-gfx] [PATCH v4 3/6] drm/i915/ttm: Drop region reference counting Thomas Hellström
2021-11-18 14:19 ` Matthew Auld
2021-11-18 13:02 ` [Intel-gfx] [PATCH v4 4/6] drm/i915/ttm: Correctly handle waiting for gpu when shrinking Thomas Hellström
2021-11-18 14:30 ` Matthew Auld
2021-11-18 13:02 ` [Intel-gfx] [PATCH v4 5/6] drm/i915/ttm: Implement asynchronous TTM moves Thomas Hellström
2021-11-19 17:18 ` Matthew Auld
2021-11-18 13:02 ` [Intel-gfx] [PATCH v4 6/6] drm/i915/ttm: Update i915_gem_obj_copy_ttm() to be asynchronous Thomas Hellström
2021-11-19 17:22 ` Matthew Auld
2021-11-18 15:32 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/ttm: Async migration (rev5) Patchwork
2021-11-18 15:59 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-11-19 5:34 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211118130230.154988-1-thomas.hellstrom@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox