public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 6/8] drm/i915: Wait for old resets before applying debugfs/i915_wedged
Date: Fri, 08 Feb 2019 11:56:59 +0200	[thread overview]
Message-ID: <87ef8i38no.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190207071829.5574-6-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Since we use the debugfs to recover the device after modifying the
> i915.reset parameter, we need to be sure that we apply the reset and not
> piggy-back onto a concurrent one in order for the parameter to take
> effect.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index a6fd157b1637..8a488ffc8b7d 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -3874,13 +3874,9 @@ i915_wedged_set(void *data, u64 val)
>  {
>  	struct drm_i915_private *i915 = data;
>  
> -	/*
> -	 * There is no safeguard against this debugfs entry colliding
> -	 * with the hangcheck calling same i915_handle_error() in
> -	 * parallel, causing an explosion. For now we assume that the
> -	 * test harness is responsible enough not to inject gpu hangs
> -	 * while it is writing to 'i915_wedged'
> -	 */
> +	/* Flush any previous reset before applying for a new one */
> +	wait_event(i915->gpu_error.reset_queue,
> +		   !test_bit(I915_RESET_BACKOFF, &i915->gpu_error.flags));

You removed the comment and yes this makes us wait on our turn
to flip the switch. But the hangcheck vs this race still holds.

Now even if they would two pile on this switch...there should be
no harm as in that case we see two log entries
resulting in a one reset.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

-Mika
>  
>  	i915_handle_error(i915, val, I915_ERROR_CAPTURE,
>  			  "Manually set wedged engine mask = %llx", val);
> -- 
> 2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-02-08  9:57 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07  7:18 [PATCH 1/8] drm/i915: Hack and slash, throttle execbuffer hogs Chris Wilson
2019-02-07  7:18 ` [PATCH 2/8] drm/i915: Defer removing fence register tracking to rpm wakeup Chris Wilson
2019-02-07 13:22   ` Mika Kuoppala
2019-02-07 13:38     ` Chris Wilson
2019-02-07 14:09       ` Mika Kuoppala
2019-02-07 14:13         ` Chris Wilson
2019-02-07  7:18 ` [PATCH 3/8] drm/i915: Revoke mmaps and prevent access to fence registers across reset Chris Wilson
2019-02-07 15:05   ` Mika Kuoppala
2019-02-07  7:18 ` [PATCH 4/8] drm/i915: Force the GPU reset upon wedging Chris Wilson
2019-02-08  9:31   ` Mika Kuoppala
2019-02-08  9:47     ` Chris Wilson
2019-02-07  7:18 ` [PATCH 5/8] drm/i915: Uninterruptibly drain the timelines on unwedging Chris Wilson
2019-02-08  9:46   ` Mika Kuoppala
2019-02-08 10:00     ` Chris Wilson
2019-02-08 15:07       ` Mika Kuoppala
2019-02-08 15:13         ` Chris Wilson
2019-02-07  7:18 ` [PATCH 6/8] drm/i915: Wait for old resets before applying debugfs/i915_wedged Chris Wilson
2019-02-08  9:56   ` Mika Kuoppala [this message]
2019-02-08 10:01     ` Chris Wilson
2019-02-07  7:18 ` [PATCH 7/8] drm/i915: Serialise resets with wedging Chris Wilson
2019-02-08 14:30   ` Mika Kuoppala
2019-02-07  7:18 ` [PATCH 8/8] drm/i915: Don't claim an unstarted request was guilty Chris Wilson
2019-02-07  7:41   ` [PATCH] " Chris Wilson
2019-02-08 14:47     ` Mika Kuoppala
2019-02-08 14:58       ` Chris Wilson
2019-02-08 15:31         ` Mika Kuoppala
2019-02-07  8:08 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/8] drm/i915: Hack and slash, throttle execbuffer hogs (rev2) Patchwork
2019-02-07  8:25 ` ✓ Fi.CI.BAT: success " Patchwork
2019-02-07  9:53 ` ✓ Fi.CI.IGT: " Patchwork
2019-02-07 16:01 ` [PATCH 1/8] drm/i915: Hack and slash, throttle execbuffer hogs Joonas Lahtinen
2019-02-07 16:05   ` Chris Wilson
2019-02-07 16:21   ` Chris Wilson
  -- strict thread matches above, loose matches on Subject: below --
2019-02-06 17:11 Chris Wilson
2019-02-06 17:11 ` [PATCH 6/8] drm/i915: Wait for old resets before applying debugfs/i915_wedged Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ef8i38no.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox