Hi, I have addressed all the feedback I got from v2 series. Most notably the interface has changed. Now those users who don't care about the exact counts can use batch_pending and batch_active like they would be flags (see i-g-t testcase), assuming they destroy the context after hang is dealt with. For those users who want more detailed heuristics before deciding some action, they can use batch_pending and batch_active as counts. Non process context related statistics are only available if CAP_SYS_ADMIN is hold. Whole series can be found in: https://github.com/mkuoppal/linux/commits/arb-robustness Test case for i-g-t is in: https://github.com/mkuoppal/intel-gpu-tools/commits/arb-robustness Thanks for your feedback, -Mika Mika Kuoppala (16): drm/i915: return context from i915_switch_context() drm/i915: cleanup i915_add_request drm/i915: reference count for i915_hw_contexts drm/i915: pass seqno to i915_hangcheck_ring_idle drm/i915: track ring progression using seqnos drm/i915: introduce i915_hangcheck_ring_hung drm/i915: detect hang using per ring hangcheck_score drm/i915: remove i915_hangcheck_hung drm/i915: add struct i915_ctx_hang_stats drm/i915: add i915_gem_context_get_hang_stats() drm/i915: add batch object and context to i915_add_request() drm/i915: mark rings which were waiting when hang happened drm/i915: find guilty batch buffer on ring resets drm/i915: refuse to submit more batchbuffers from guilty context drm/i915: add i915_reset_count drm/i915: add i915_get_reset_stats_ioctl drivers/gpu/drm/i915/i915_dma.c | 3 +- drivers/gpu/drm/i915/i915_drv.c | 60 +++++++++++- drivers/gpu/drm/i915/i915_drv.h | 73 +++++++++++--- drivers/gpu/drm/i915/i915_gem.c | 141 ++++++++++++++++++++++++---- drivers/gpu/drm/i915/i915_gem_context.c | 79 ++++++++++++---- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 28 +++++- drivers/gpu/drm/i915/i915_irq.c | 113 ++++++++++------------ drivers/gpu/drm/i915/intel_overlay.c | 4 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.h | 8 ++ include/uapi/drm/i915_drm.h | 17 ++++ 11 files changed, 410 insertions(+), 118 deletions(-) -- 1.7.9.5