All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: [Intel-gfx] [PATCH 3/3] drm/i915/gt: Retire cancelled requests on unload
Date: Mon, 10 Aug 2020 09:58:55 +0100	[thread overview]
Message-ID: <20200810085855.28433-3-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20200810085855.28433-1-chris@chris-wilson.co.uk>

If we manage to hit the intel_gt_set_wedged_on_fini() while active, i.e.
module unload during a stress test, we may cancel the requests but not
clean up. This leads to a slow module unload as we wait for something or
other to trigger the retirement flushing. Instead if we explicitly
cancel then cleanup on an active unload, it should be instant.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_reset.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
index ac36b67fb46b..4e5e13dc95da 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -19,6 +19,7 @@
 #include "intel_engine_pm.h"
 #include "intel_gt.h"
 #include "intel_gt_pm.h"
+#include "intel_gt_requests.h"
 #include "intel_reset.h"
 
 #include "uc/intel_guc.h"
@@ -1370,6 +1371,7 @@ void intel_gt_set_wedged_on_fini(struct intel_gt *gt)
 {
 	intel_gt_set_wedged(gt);
 	set_bit(I915_WEDGED_ON_FINI, &gt->reset.flags);
+	intel_gt_retire_requests(gt); /* cleanup any wedged requests */
 }
 
 void intel_gt_init_reset(struct intel_gt *gt)
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-08-10  8:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10  8:58 [Intel-gfx] [PATCH 1/3] drm/i915/gt: Signal cancelled requests Chris Wilson
2020-08-10  8:58 ` [Intel-gfx] [PATCH 2/3] drm/i915/selftests: Finish pending mock requests on cancellation Chris Wilson
2020-08-10  8:58 ` Chris Wilson [this message]
2020-08-10  9:12 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/3] drm/i915/gt: Signal cancelled requests Patchwork
2020-08-10  9:35 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-08-10 12:06 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-09-16  9:46 [Intel-gfx] [PATCH 1/3] " Chris Wilson
2020-09-16  9:46 ` [Intel-gfx] [PATCH 3/3] drm/i915/gt: Retire cancelled requests on unload Chris Wilson
2020-09-16 17:40   ` Matthew Auld
2020-09-29  8:28 [Intel-gfx] [PATCH 1/3] drm/i915/gt: Signal cancelled requests Chris Wilson
2020-09-29  8:28 ` [Intel-gfx] [PATCH 3/3] drm/i915/gt: Retire cancelled requests on unload 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=20200810085855.28433-3-chris@chris-wilson.co.uk \
    --to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.