All of lore.kernel.org
 help / color / mirror / Atom feed
From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
	Martin Peres <martin.peres@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t] lib: Don't use full reset on simulated hardware
Date: Thu,  5 Sep 2019 14:07:10 +0200	[thread overview]
Message-ID: <20190905120710.24770-1-janusz.krzysztofik@linux.intel.com> (raw)

If DROP_RESET_ACTIVE is requested while there is a large queue of pending
GEM requests, waiting for idle engines performed as a first step of
i915_gem_drop_caches debugfs request handler times out and an otherwise
healthy device is marked wedged.  If that happens while reset capabilities
are disabled or not supported, there is no possibility to successfully
reset the device after requests are retired.

Avoid fake GPU terminally wedged conditions by not requesting
DROP_RESET_ACTIVE from exit handler when running on simulated hardware.
As a side effect, terminating a very busy test and running a subsequent
one may take quite a while.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
---
 lib/drmtest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index c379a7b7..b73bc132 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -318,7 +318,8 @@ static void __cancel_work_at_exit(int fd)
 	igt_sysfs_set_parameter(fd, "reset", "%x", -1u /* any method */);
 	igt_drop_caches_set(fd,
 			    /* cancel everything */
-			    DROP_RESET_ACTIVE | DROP_RESET_SEQNO |
+			    igt_run_in_simulation() ? 0 : DROP_RESET_ACTIVE |
+			    DROP_RESET_SEQNO |
 			    /* cleanup */
 			    DROP_ACTIVE | DROP_RETIRE | DROP_IDLE | DROP_FREED);
 }
-- 
2.21.0

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

WARNING: multiple messages have this Message-ID (diff)
From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
	Martin Peres <martin.peres@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t] lib: Don't use full reset on simulated hardware
Date: Thu,  5 Sep 2019 14:07:10 +0200	[thread overview]
Message-ID: <20190905120710.24770-1-janusz.krzysztofik@linux.intel.com> (raw)

If DROP_RESET_ACTIVE is requested while there is a large queue of pending
GEM requests, waiting for idle engines performed as a first step of
i915_gem_drop_caches debugfs request handler times out and an otherwise
healthy device is marked wedged.  If that happens while reset capabilities
are disabled or not supported, there is no possibility to successfully
reset the device after requests are retired.

Avoid fake GPU terminally wedged conditions by not requesting
DROP_RESET_ACTIVE from exit handler when running on simulated hardware.
As a side effect, terminating a very busy test and running a subsequent
one may take quite a while.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
---
 lib/drmtest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index c379a7b7..b73bc132 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -318,7 +318,8 @@ static void __cancel_work_at_exit(int fd)
 	igt_sysfs_set_parameter(fd, "reset", "%x", -1u /* any method */);
 	igt_drop_caches_set(fd,
 			    /* cancel everything */
-			    DROP_RESET_ACTIVE | DROP_RESET_SEQNO |
+			    igt_run_in_simulation() ? 0 : DROP_RESET_ACTIVE |
+			    DROP_RESET_SEQNO |
 			    /* cleanup */
 			    DROP_ACTIVE | DROP_RETIRE | DROP_IDLE | DROP_FREED);
 }
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2019-09-05 12:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 12:07 Janusz Krzysztofik [this message]
2019-09-05 12:07 ` [igt-dev] [PATCH i-g-t] lib: Don't use full reset on simulated hardware Janusz Krzysztofik
2019-09-05 12:54 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-09-05 15:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=20190905120710.24770-1-janusz.krzysztofik@linux.intel.com \
    --to=janusz.krzysztofik@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=martin.peres@linux.intel.com \
    --cc=tvrtko.ursulin@intel.com \
    /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.