Skip to content

Stability improvements to error state capture

Tomas Elf intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 45 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8drm/i915: Early exit from semaphore_waits_for for execlist mode.drivers/gpu/drm/i915/i915_irq.c+20 -00 replies
2/8drm/i915: Migrate to safe iterators in error state capturedrivers/gpu/drm/i915/i915_gpu_error.c+19 -196 replies
3/8drm/i915: Cope with request list state change during error state capturedrivers/gpu/drm/i915/i915_gpu_error.c+13 -08 replies
4/8drm/i915: NULL checking when capturing buffer objects during error state capturedrivers/gpu/drm/i915/i915_gpu_error.c+9 -16 replies
5/8drm/i915: vma NULL pointer checkdrivers/gpu/drm/i915/i915_gem.c+5 -16 replies
6/8drm/i915: Use safe list iteratorsdrivers/gpu/drm/i915/i915_gem.c+5 -44 replies
7/8drm/i915: Grab execlist spinlock to avoid post-reset concurrency issues.drivers/gpu/drm/i915/i915_gem.c+5 -022 replies
8/8drm/i915: NULL check of unpin_workdrivers/gpu/drm/i915/intel_display.c+5 -07 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchDave GordonThomas Daniel
1/8
2/8
3/8
4/8
5/8
6/8
7/8R-b R-b R-b R-b
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] Stability improvements to error state capture

In preparation for the upcoming TDR per-engine hang recovery enablement the stability of the error state capture code needs to be addressed. The biggest reason for this is that in order to test TDR a long-duration test needs to be run for several hours during which a large number of hangs is handled together with the associated error state captures. In its current state the i915 driver experiences various forms of kernel panics and other kinds of fatal errors within the first hour(s) of the hang testing. The patches in this series have been tested with a long-duration hang testing clocking in at 12+ hours and should suffice as an initial improvement.

The underlying issue of trying to capture the driver state without synchronization is still a problem that remains to be fixed. One way of at least further alleviating this problem that has been suggested by John Harrison is to do a mutex_trylock() of the struct_mutex for a while (give it a second or so) before going into the error state capture from i915_handle_error(). Then, if nobody is holding the struct_mutex, the error state capture is considerably more safe from sudden state changes. If some thread has hung while holding the struct_mutex one could at least hope that there would be no sudden state changes during error state capture due to the hung state (unless some thread has been caught in a livelock or is perhaps not stuck at all but is simply running for a very long time - still some improvements might be expected here).

One fix that has been omitted from this patch series is in regards to the broken ring space calculation following a full GPU reset. Two independent patches to solve this are: "[PATCH] drm/i915: Update ring space correctly on lrc context reset" by Mika Kuoppala and "[51/70] drm/i915: Record the position of the start of the request" by Chris Wilson. Since the solution is currently in review I'll simply mention it here as a pre-requistite for long-duration operations stability testing. Without a fix for this problem the ring space is terminally depleted within the first iterations of the hang test, simply because the ring space is miscalculated following every GPU hang recovery and traversal of the GEM init hw path gradually leading to a terminally hung state.

Tomas Elf (8):
drm/i915: Early exit from semaphore_waits_for for execlist mode. drm/i915: Migrate to safe iterators in error state capture drm/i915: Cope with request list state change during error state
capture
drm/i915: NULL checking when capturing buffer objects during error
state capture
drm/i915: vma NULL pointer check
drm/i915: Use safe list iterators
drm/i915: Grab execlist spinlock to avoid post-reset concurrency
issues.
drm/i915: NULL check of unpin_work

 drivers/gpu/drm/i915/i915_gem.c       | 18 ++++++++---
 drivers/gpu/drm/i915/i915_gpu_error.c | 61 +++++++++++++++++++++++------------
 drivers/gpu/drm/i915/i915_irq.c       | 20 ++++++++++++
 drivers/gpu/drm/i915/intel_display.c  |  5 +++
 4 files changed, 80 insertions(+), 24 deletions(-)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx