mbox series

[v5,0/3] drm/i915: Prepare error capture for asynchronous migration

Message ID 20211102102827.442902-1-thomas.hellstrom@linux.intel.com (mailing list archive)
Headers show
Series drm/i915: Prepare error capture for asynchronous migration | expand

Message

Thomas Hellström Nov. 2, 2021, 10:28 a.m. UTC
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 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.

The second patch changes the allocation mode during capture to reflect that
capturing is typically done in the fence signalling critical path. More
details on the patch itself.

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.

Thomas Hellström (3):
  drm/i915: Update error capture code to avoid using the current vma
    state
  drm/i915: Use __GFP_KSWAPD_RECLAIM in the capture code
  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  |   2 +-
 drivers/gpu/drm/i915/i915_gpu_error.c         | 180 ++++++++++-----
 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 +++++----
 13 files changed, 837 insertions(+), 146 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_vma_snapshot.c
 create mode 100644 drivers/gpu/drm/i915/i915_vma_snapshot.h

Comments

Thomas Hellström Nov. 2, 2021, 4:28 p.m. UTC | #1
On 11/2/21 17:02, Patchwork wrote:
> Project List - Patchwork *Patch Details*
> *Series:* 	drm/i915: Prepare error capture for asynchronous migration
> *URL:* 	https://patchwork.freedesktop.org/series/96493/
> *State:* 	failure
> *Details:* 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21503/index.html
>
>
>   CI Bug Log - changes from CI_DRM_10827_full -> Patchwork_21503_full
>
>
>     Summary
>
> *FAILURE*
>
> Serious unknown changes coming with Patchwork_21503_full absolutely 
> need to be
> verified manually.
>
> If you think the reported changes have nothing to do with the changes
> introduced in Patchwork_21503_full, please notify your bug team to 
> allow them
> to document this new failure mode, which will reduce false positives 
> in CI.
>
>
>     Participating hosts (10 -> 10)
>
> No changes in participating hosts
>
>
>     Possible new issues
>
> Here are the unknown changes that may have been introduced in 
> Patchwork_21503_full:
>
>
>       Piglit changes
>
>
>         Possible regressions
>
>   * spec@arb_gpu_shader5@texturegather@fs-r-0-unorm-2darray (NEW):
>       o pig-kbl-iris: NOTRUN -> INCOMPLETE
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21503/pig-kbl-iris/spec@arb_gpu_shader5@texturegather@fs-r-0-unorm-2darray.html>
>         +5 similar issues
>
Lakshmi, This failure is unrelated.

Thanks,

Thomas
Vudum, Lakshminarayana Nov. 2, 2021, 5:50 p.m. UTC | #2
We don’t have the test in our db “spec@arb_gpu_shader5@texturegather@fs-r-0-unorm-2darray”. So, I cannot really address this issue.

FYI @Latvala, Petri<mailto:petri.latvala@intel.com>

From: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Sent: Tuesday, November 2, 2021 9:29 AM
To: intel-gfx@lists.freedesktop.org; Vudum, Lakshminarayana <lakshminarayana.vudum@intel.com>
Subject: Re: ✗ Fi.CI.IGT: failure for drm/i915: Prepare error capture for asynchronous migration



On 11/2/21 17:02, Patchwork wrote:
Patch Details
Series:

drm/i915: Prepare error capture for asynchronous migration

URL:

https://patchwork.freedesktop.org/series/96493/

State:

failure

Details:

https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21503/index.html

CI Bug Log - changes from CI_DRM_10827_full -> Patchwork_21503_full
Summary

FAILURE

Serious unknown changes coming with Patchwork_21503_full absolutely need to be
verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_21503_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.

Participating hosts (10 -> 10)

No changes in participating hosts

Possible new issues

Here are the unknown changes that may have been introduced in Patchwork_21503_full:

Piglit changes
Possible regressions

  *   spec@arb_gpu_shader5@texturegather@fs-r-0-unorm-2darray (NEW):

     *   pig-kbl-iris: NOTRUN -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21503/pig-kbl-iris/spec@arb_gpu_shader5@texturegather@fs-r-0-unorm-2darray.html> +5 similar issues

Lakshmi, This failure is unrelated.

Thanks,

Thomas