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: [PATCH v6 0/4] drm/i915: Prepare error capture for asynchronous migration Date: Mon, 8 Nov 2021 18:45:43 +0100 [thread overview] Message-ID: <20211108174547.979714-1-thomas.hellstrom@linux.intel.com> (raw) This patch series prepares error capture for asynchronous migration, where the vma pages may not reflect the pages the GPU is currently executing from but may be several migrations ahead. The first patch gets rid of some contigous memory allocations that may blow up due to the change of allocation mode introduced in patch 2/4 The third patch introduces vma state snapshots that record the vma state at request submission time. It also takes additional measures to make sure that the capture list and request is not disappearing from under us while capturing. The latter may otherwise happen if a heartbeat triggered parallel capture is running during a manual reset which retires the request. Finally the last patch is more of a POC patch and not strictly needed yet, but will be (or at least something very similar) soon for async unbinding. It will make sure that unbinding doesn't complete or signal completion before capture is done. Async reuse of memory can't happen until unbinding signals complete and without waiting for capture done, we might capture contents of reused memory. Before the last patch the vma active is instead still keeping the vma alive, but that will not work with async unbinding anymore, and also it is still not clear how we guarantee keeping the vma alive long enough to even grab an active reference during capture. v2: - Mostly Fixes for selftests and rebinding. See patch 3. v3: - Honor the unbind fence also when evicting for suspend on gen6. - Minor cleanups on patch 3. v4: - Break out patch 2 from patch 1. v5: - Ditch a patch from the since it's already commited. - Use __GFP_KSWAPD_RECLAIM rather than GFP_NOWAIT in patch 2. v6: - Reorder patches and introduce patch 1/4 which gets rid of some contiguous allocations that are likely to fail after introduction of patch 2/4. - Use #if IS_ENABLED() rather than #ifdef similar to the rest of the driver Thomas Hellström (4): drm/i915: Avoid allocating a page array for the gpu coredump drm/i915: Use __GFP_KSWAPD_RECLAIM in the capture code drm/i915: Update error capture code to avoid using the current vma state drm/i915: Initial introduction of vma resources drivers/gpu/drm/i915/Makefile | 1 + .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 137 +++++++++-- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 8 +- .../drm/i915/gt/intel_execlists_submission.c | 3 +- drivers/gpu/drm/i915/i915_gpu_error.c | 228 ++++++++++++------ drivers/gpu/drm/i915/i915_gpu_error.h | 4 +- drivers/gpu/drm/i915/i915_request.c | 63 +++-- drivers/gpu/drm/i915/i915_request.h | 20 +- drivers/gpu/drm/i915/i915_vma.c | 206 +++++++++++++++- drivers/gpu/drm/i915/i915_vma.h | 20 +- drivers/gpu/drm/i915/i915_vma_snapshot.c | 131 ++++++++++ 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 | 98 +++++--- 14 files changed, 865 insertions(+), 171 deletions(-) create mode 100644 drivers/gpu/drm/i915/i915_vma_snapshot.c create mode 100644 drivers/gpu/drm/i915/i915_vma_snapshot.h -- 2.31.1
WARNING: multiple messages have this Message-ID (diff)
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 v6 0/4] drm/i915: Prepare error capture for asynchronous migration Date: Mon, 8 Nov 2021 18:45:43 +0100 [thread overview] Message-ID: <20211108174547.979714-1-thomas.hellstrom@linux.intel.com> (raw) This patch series prepares error capture for asynchronous migration, where the vma pages may not reflect the pages the GPU is currently executing from but may be several migrations ahead. The first patch gets rid of some contigous memory allocations that may blow up due to the change of allocation mode introduced in patch 2/4 The third patch introduces vma state snapshots that record the vma state at request submission time. It also takes additional measures to make sure that the capture list and request is not disappearing from under us while capturing. The latter may otherwise happen if a heartbeat triggered parallel capture is running during a manual reset which retires the request. Finally the last patch is more of a POC patch and not strictly needed yet, but will be (or at least something very similar) soon for async unbinding. It will make sure that unbinding doesn't complete or signal completion before capture is done. Async reuse of memory can't happen until unbinding signals complete and without waiting for capture done, we might capture contents of reused memory. Before the last patch the vma active is instead still keeping the vma alive, but that will not work with async unbinding anymore, and also it is still not clear how we guarantee keeping the vma alive long enough to even grab an active reference during capture. v2: - Mostly Fixes for selftests and rebinding. See patch 3. v3: - Honor the unbind fence also when evicting for suspend on gen6. - Minor cleanups on patch 3. v4: - Break out patch 2 from patch 1. v5: - Ditch a patch from the since it's already commited. - Use __GFP_KSWAPD_RECLAIM rather than GFP_NOWAIT in patch 2. v6: - Reorder patches and introduce patch 1/4 which gets rid of some contiguous allocations that are likely to fail after introduction of patch 2/4. - Use #if IS_ENABLED() rather than #ifdef similar to the rest of the driver Thomas Hellström (4): drm/i915: Avoid allocating a page array for the gpu coredump drm/i915: Use __GFP_KSWAPD_RECLAIM in the capture code drm/i915: Update error capture code to avoid using the current vma state drm/i915: Initial introduction of vma resources drivers/gpu/drm/i915/Makefile | 1 + .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 137 +++++++++-- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 8 +- .../drm/i915/gt/intel_execlists_submission.c | 3 +- drivers/gpu/drm/i915/i915_gpu_error.c | 228 ++++++++++++------ drivers/gpu/drm/i915/i915_gpu_error.h | 4 +- drivers/gpu/drm/i915/i915_request.c | 63 +++-- drivers/gpu/drm/i915/i915_request.h | 20 +- drivers/gpu/drm/i915/i915_vma.c | 206 +++++++++++++++- drivers/gpu/drm/i915/i915_vma.h | 20 +- drivers/gpu/drm/i915/i915_vma_snapshot.c | 131 ++++++++++ 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 | 98 +++++--- 14 files changed, 865 insertions(+), 171 deletions(-) create mode 100644 drivers/gpu/drm/i915/i915_vma_snapshot.c create mode 100644 drivers/gpu/drm/i915/i915_vma_snapshot.h -- 2.31.1
next reply other threads:[~2021-11-08 18:01 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-08 17:45 Thomas Hellström [this message] 2021-11-08 17:45 ` [Intel-gfx] [PATCH v6 0/4] drm/i915: Prepare error capture for asynchronous migration Thomas Hellström 2021-11-08 17:45 ` [PATCH v6 1/4] drm/i915: Avoid allocating a page array for the gpu coredump Thomas Hellström 2021-11-08 17:45 ` [Intel-gfx] " Thomas Hellström 2021-11-22 15:08 ` Ramalingam C 2021-11-22 15:08 ` [Intel-gfx] " Ramalingam C 2021-11-08 17:45 ` [PATCH v6 2/4] drm/i915: Use __GFP_KSWAPD_RECLAIM in the capture code Thomas Hellström 2021-11-08 17:45 ` [Intel-gfx] " Thomas Hellström 2021-11-22 16:50 ` Ramalingam C 2021-11-08 17:45 ` [PATCH v6 3/4] drm/i915: Update error capture code to avoid using the current vma state Thomas Hellström 2021-11-08 17:45 ` [Intel-gfx] " Thomas Hellström 2021-11-29 9:13 ` Ramalingam C 2021-11-29 9:13 ` [Intel-gfx] " Ramalingam C 2021-11-08 17:45 ` [PATCH v6 4/4] drm/i915: Initial introduction of vma resources Thomas Hellström 2021-11-08 17:45 ` [Intel-gfx] " Thomas Hellström 2021-11-08 18:29 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Prepare error capture for asynchronous migration (rev2) Patchwork 2021-11-08 19:02 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork 2021-11-08 20:21 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=20211108174547.979714-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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.