Re: [PATCH] drm/i915: Don't accumulate hangcheck score on forward progress

Chris Wilson
2014-08-05T14:53:24Z

On Tue, Aug 05, 2014 at 05:16:26PM +0300, Mika Kuoppala wrote:
> If the actual head has progressed forward inside a batch (request),
> don't accumulate hangcheck score.
>
> As the hangcheck score in increased only by acthd jumping backwards,
> the result is that we only declare an active batch as stuck if it is
> trapped inside a loop. Or that the looping will dominate the batch
> progression so that it overcomes the bonus that forward progress gives.
>
> v2: Improved commit message (Chris Wilson)
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/i915_gpu_error.c | 2 ++
> drivers/gpu/drm/i915/i915_irq.c | 15 ++++++++++++---
> drivers/gpu/drm/i915/intel_ringbuffer.h | 2 ++
> 3 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> index 9a13eed..a422f96 100644
> --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> @@ -229,6 +229,8 @@ static const char *hangcheck_action_to_str(enum intel_ring_hangcheck_action a)
> return "wait";
> case HANGCHECK_ACTIVE:
> return "active";
> + case HANGCHECK_ACTIVE_LOOP:
> + return "active_loop";

This string is for the user, i.e. me, and I'd prefer it to say
"active (loop)" rather than have the underscore.

Other than that,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

--
Chris Wilson, Intel Open Source Technology Centre