Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <andrzej.hajda@intel.com>
To: intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
	Chris Wilson <chris.p.wilson@intel.com>,
	Matthew Auld <matthew.auld@intel.com>,
	Nirmoy Das <nirmoy.das@intel.com>
Subject: [Intel-gfx] [PATCH i-g-t] tests/i915/gem_ctx_persistence: adjust timeout according to engines
Date: Wed,  7 Dec 2022 12:47:30 +0100	[thread overview]
Message-ID: <20221207114730.77304-1-andrzej.hajda@intel.com> (raw)

With introduction of long running compute context preemption timeouts
in some engines (rcs and ccs) can be quite big (by default 7.5s).
Keeping spinner timeout to at least twice bigger than engines preemption
timeout should allow to finish the test without -ETIME error.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2410
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
 tests/i915/gem_ctx_persistence.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
index a844439de19..9fb52818616 100644
--- a/tests/i915/gem_ctx_persistence.c
+++ b/tests/i915/gem_ctx_persistence.c
@@ -1173,6 +1173,14 @@ static void many_contexts(int i915, const intel_ctx_cfg_t *cfg)
 	gem_sync(i915, spin->handle);
 	igt_spin_reset(spin);
 
+	for_each_ctx_cfg_engine(i915, cfg, e) {
+		int t = 0;
+
+		gem_engine_property_scanf(i915, e->name,
+					  "preempt_timeout_ms", "%d", &t);
+		timeout = max_t(int64_t, timeout, 2000000ll * t);
+	}
+
 	igt_until_timeout(30) {
 		for_each_ctx_cfg_engine(i915, cfg, e) {
 			const intel_ctx_t *ctx;
-- 
2.34.1


             reply	other threads:[~2022-12-07 11:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 11:47 Andrzej Hajda [this message]
2022-12-07 12:08 ` [Intel-gfx] [PATCH i-g-t] tests/i915/gem_ctx_persistence: adjust timeout according to engines Tvrtko Ursulin

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=20221207114730.77304-1-andrzej.hajda@intel.com \
    --to=andrzej.hajda@intel.com \
    --cc=chris.p.wilson@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=nirmoy.das@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox