public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: John.C.Harrison@Intel.com
Cc: IGT-Dev@Lists.FreeDesktop.Org, Intel-GFX@Lists.FreeDesktop.Org
Subject: Re: [Intel-gfx] [PATCH v3 i-g-t 14/15] tests/i915/i915_hangman: Configure engine properties for quicker hangs
Date: Thu, 13 Jan 2022 14:38:28 -0800	[thread overview]
Message-ID: <20220113223828.GA21140@jons-linux-dev-box> (raw)
In-Reply-To: <20220113195947.1536897-15-John.C.Harrison@Intel.com>

On Thu, Jan 13, 2022 at 11:59:46AM -0800, John.C.Harrison@Intel.com wrote:
> From: John Harrison <John.C.Harrison@Intel.com>
> 
> Some platforms have very long timeouts configured for some engines.
> Some have them disabled completely. That makes for a very slow (or
> broken) hangman test. So explicitly configure the engines to have
> reasonable settings first.
> 
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
> ---
>  tests/i915/i915_hangman.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/tests/i915/i915_hangman.c b/tests/i915/i915_hangman.c
> index 567eb71ee..1a2b2cf7a 100644
> --- a/tests/i915/i915_hangman.c
> +++ b/tests/i915/i915_hangman.c
> @@ -500,8 +500,12 @@ igt_main
>  {
>  	const intel_ctx_t *ctx;
>  	igt_hang_t hang = {};
> +	struct gem_engine_properties saved_params[GEM_MAX_ENGINES];
> +	int num_engines = 0;
>  
>  	igt_fixture {
> +		const struct intel_execution_engine2 *e;
> +
>  		device = drm_open_driver(DRIVER_INTEL);
>  		igt_require_gem(device);
>  
> @@ -515,6 +519,13 @@ igt_main
>  		igt_require(has_error_state(sysfs));
>  
>  		gem_require_mmap_wc(device);
> +
> +		for_each_physical_engine(device, e) {
> +			saved_params[num_engines].engine = e;
> +			saved_params[num_engines].preempt_timeout = 500;
> +			saved_params[num_engines].heartbeat_interval = 1000;
> +			gem_engine_properties_configure(device, saved_params + num_engines++);
> +		}
>  	}
>  
>  	igt_describe("Basic error capture");
> @@ -546,6 +557,11 @@ igt_main
>  	do_tests("engine", "engine", ctx);
>  
>  	igt_fixture {
> +		int i;
> +
> +		for (i = 0; i < num_engines; i++)
> +			gem_engine_properties_restore(device, saved_params + i);

If you wanted to be clever:

while (num_engines--)
	gem_engine_properties_restore(device, saved_params + num_engines);

Regardless:
Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> +
>  		igt_disallow_hang(device, hang);
>  		intel_ctx_destroy(device, ctx);
>  		close(device);
> -- 
> 2.25.1
> 

  reply	other threads:[~2022-01-13 22:44 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 19:59 [Intel-gfx] [PATCH v3 i-g-t 00/15] Fixes for i915_hangman and gem_exec_capture John.C.Harrison
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 01/15] tests/i915/i915_hangman: Add descriptions John.C.Harrison
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 02/15] lib/hang: Fix igt_require_hang_ring to work with all engines John.C.Harrison
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 03/15] tests/i915/i915_hangman: Update capture test to use engine structure John.C.Harrison
2022-01-13 19:58   ` [Intel-gfx] [igt-dev] " Matthew Brost
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 04/15] tests/i915/i915_hangman: Explicitly test per engine reset vs full GPU reset John.C.Harrison
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 05/15] tests/i915/i915_hangman: Add uevent test & fix detector John.C.Harrison
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 06/15] tests/i915/i915_hangman: Use the correct context in hangcheck_unterminated John.C.Harrison
2022-01-13 20:00   ` Matthew Brost
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 07/15] lib/store: Refactor common store code into helper function John.C.Harrison
2022-01-13 20:10   ` [Intel-gfx] [igt-dev] " Matthew Brost
2022-01-13 20:27     ` John Harrison
2022-01-13 20:23       ` Matthew Brost
2022-01-13 20:40         ` John Harrison
2022-01-13 20:50   ` [Intel-gfx] [PATCH i-g-t] " John.C.Harrison
2022-01-13 20:53     ` [Intel-gfx] [igt-dev] " Matthew Brost
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 08/15] tests/i915/i915_hangman: Add alive-ness test after error capture John.C.Harrison
2022-01-13 20:18   ` Matthew Brost
2022-01-13 23:24   ` [Intel-gfx] [PATCH i-g-t] " John.C.Harrison
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 09/15] tests/i915/i915_hangman: Remove reliance on context persistance John.C.Harrison
2022-01-13 20:30   ` [Intel-gfx] [igt-dev] " Matthew Brost
2022-01-13 20:42     ` John Harrison
2022-01-13 20:38       ` Matthew Brost
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 10/15] tests/i915/i915_hangman: Run background task on all engines John.C.Harrison
2022-01-13 20:48   ` Matthew Brost
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 11/15] tests/i915/i915_hangman: Don't let background contexts cause a ban John.C.Harrison
2022-01-13 21:01   ` [Intel-gfx] [igt-dev] " Matthew Brost
2022-01-13 21:19     ` John Harrison
2022-01-13 21:26   ` [Intel-gfx] [PATCH i-g-t] " John.C.Harrison
2022-01-13 22:30     ` Matthew Brost
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 12/15] tests/i915/gem_exec_fence: Configure correct context John.C.Harrison
2022-01-13 21:06   ` [Intel-gfx] [igt-dev] " Matthew Brost
2022-01-13 21:23     ` John Harrison
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 13/15] lib/i915: Add helper for non-destructive engine property updates John.C.Harrison
2022-01-13 22:33   ` [Intel-gfx] [igt-dev] " Matthew Brost
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 14/15] tests/i915/i915_hangman: Configure engine properties for quicker hangs John.C.Harrison
2022-01-13 22:38   ` Matthew Brost [this message]
2022-01-13 19:59 ` [Intel-gfx] [PATCH v3 i-g-t 15/15] tests/i915/gem_exec_capture: Restore engines John.C.Harrison
2022-01-13 23:04   ` [Intel-gfx] [igt-dev] " Matthew Brost

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=20220113223828.GA21140@jons-linux-dev-box \
    --to=matthew.brost@intel.com \
    --cc=IGT-Dev@Lists.FreeDesktop.Org \
    --cc=Intel-GFX@Lists.FreeDesktop.Org \
    --cc=John.C.Harrison@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