Skip to content

RFC TDR and Watchdog Reset

Lister, Ian intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest13 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13drm/i915: Periodic sampling for hang detectiondrivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem.c +1 more+50 -221 reply
2/13drm/i915: Improved hang detection logicdrivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/i915_irq.c drivers/gpu/drm/i915/intel_ringbuffer.c +2 more+147 -931 reply
3/13drm/i915: Additional ring operations for TDRdrivers/gpu/drm/i915/i915_reg.h drivers/gpu/drm/i915/intel_ringbuffer.c drivers/gpu/drm/i915/intel_ringbuffer.h+461 -81 reply
4/13drm/i915: Force wake restore for TDRdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_reg.h drivers/gpu/drm/i915/intel_ringbuffer.h +1 more+192 -111 reply
5/13drm/i915: Per-engine recoverydrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/i915_irq.c +3 more+242 -191 reply
6/13drm/i915: Communicating reset requestsdrivers/gpu/drm/i915/i915_debugfs.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem.c +3 more+210 -511 reply
7/13drm/i915: Additional debug for TDRdrivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/intel_uncore.c+6 -00 replies
8/13drm/i915: TDR loose endsdrivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_drv.h +2 more+74 -41 reply
9/13drm/i915: Watchdog timer support functionsdrivers/gpu/drm/i915/i915_reg.h drivers/gpu/drm/i915/intel_ringbuffer.c drivers/gpu/drm/i915/intel_ringbuffer.h+92 -01 reply
10/13drm/i915: MI_LOAD_REGISTER_IMM fixdrivers/gpu/drm/i915/i915_gem_execbuffer.c+7 -10 replies
11/13drm/i915: Added watchdog interrupt handlingdrivers/gpu/drm/i915/i915_irq.c drivers/gpu/drm/i915/i915_reg.h drivers/gpu/drm/i915/intel_ringbuffer.h+36 -01 reply
12/13drm/i915: Enabled watchdog timer interruptsdrivers/gpu/drm/i915/intel_ringbuffer.c+35 -120 replies
13/13drm/i915: Exec buffer inserts watchdog commandsdrivers/gpu/drm/i915/i915_debugfs.c drivers/gpu/drm/i915/i915_gem_execbuffer.c drivers/gpu/drm/i915/i915_irq.c +1 more+37 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 00/13] TDR and Watchdog Reset

This patchset contains TDR and Watchdog reset against a 3.13 drm-intel-nightly tree that is now about 2 weeks old.

I have re-worked the TDR and Watchdog Reset features to integrate them more closely with the existing TDR and scoring mechanism.

This is still a work-in-progress and I am currently debugging a couple of issues but I would like to get some early feedback.

Thanks,
Ian.

Quoted 1 line

From f71a7de85e9d81be3aa3962c8fe2557235ff21c1 Mon Sep 17 00:00:00 2001

Message-Id: <[email protected]>
From: ian-lister <[email protected]>
Date: Mon, 16 Dec 2013 13:51:39 +0000
Subject: [RFC 00/13] TDR and Watchdog Reset

This patchset adds support for per-engine timeout detection and recovery and adds batch specific watchdog reset.

Per-ring TDR
The detection logic has been modified to detect hangs on individual engines and pass this information through the to the recovery handler. Rather than a global reset it will attempt a per-engine reset. The registers associated with the ring are saved and restored so that when the ring restarts it continues from the next instruction in the ring. For example, if it was executing an MI_START_BATCH_BUFFER command it will advance to the next instruction which is likely to be the mailbox updates and user interrupt. This means that no extra effort is required to deal with synchronisation. From the perspective of the driver it looks like the batch buffer completed normally as all the normal signalling will take place, however the context stats will have been updated to flag up the guilty context.

Watchdog Reset
This is requested via flags to the batch buffer submission IOCTL. It is currently only supported for the render and video rings. The batch buffer command is surrounded by a hardware timer start command and stop command. If the batch completes before the timer expires then the timer is cancelled and no interrupt is generated so everything continues normally. However if the batch hangs then the timer will generate an interrupt and it will trigger an engine reset. This feature requires per-ring TDR to do the recovery work.

ian-lister (13):
drm/i915: Periodic sampling for hang detection
drm/i915: Improved hang detection logic
drm/i915: Additional ring operations for TDR
drm/i915: Force wake restore for TDR
drm/i915: Per-engine recovery
drm/i915: Communicating reset requests
drm/i915: Additional debug for TDR
drm/i915: TDR loose ends
drm/i915: Watchdog timer support functions
drm/i915: MI_LOAD_REGISTER_IMM fix
drm/i915: Added watchdog interrupt handling
drm/i915: Enabled watchdog timer interrupts
drm/i915: Exec buffer inserts watchdog commands

 drivers/gpu/drm/i915/i915_debugfs.c        |  67 ++++
 drivers/gpu/drm/i915/i915_dma.c            |   3 +
 drivers/gpu/drm/i915/i915_drv.c            |  46 +++
 drivers/gpu/drm/i915/i915_drv.h            |  41 ++-
 drivers/gpu/drm/i915/i915_gem.c            |  26 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |  30 +-
 drivers/gpu/drm/i915/i915_irq.c            | 531
++++++++++++++++++---------
 drivers/gpu/drm/i915/i915_reg.h            |  21 ++
 drivers/gpu/drm/i915/intel_display.c       |  30 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c    | 557
+++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/intel_ringbuffer.h    |  53 +++
 drivers/gpu/drm/i915/intel_uncore.c        | 373 ++++++++++++++++++-
 include/drm/drmP.h                         |   7 +
 13 files changed, 1575 insertions(+), 210 deletions(-)
Signature · 1 line
1.8.5.1