Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t] tests/gem_reset_stats: Don't allow request watchdog to interfere
@ 2023-04-13 14:36 Janusz Krzysztofik
  2023-04-13 15:31 ` Andrzej Hajda
  0 siblings, 1 reply; 2+ messages in thread
From: Janusz Krzysztofik @ 2023-04-13 14:36 UTC (permalink / raw)
  To: igt-dev; +Cc: intel-gfx, Andrzej Hajda, Chris Wilson, Nirmoy Das

A user reported recently that some subtests are failing.  The test was
blocklisted in 2018, so we've lost CI feedback on its results since then.

In 2021, request watchdog with 20 seconds timeout was introduced to i915.
Kernel logs from failed subtest runs indicate that the request watchdog
interfers with engine heartbeat and request preemption used by the test
for exercising reset statistics.

Disable request watchdog during the test execution.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8310
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
---
 tests/i915/gem_reset_stats.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/i915/gem_reset_stats.c b/tests/i915/gem_reset_stats.c
index baa101517d..7b003d88b6 100644
--- a/tests/i915/gem_reset_stats.c
+++ b/tests/i915/gem_reset_stats.c
@@ -906,6 +906,7 @@ igt_main
 	igt_fixture {
 		bool has_reset_stats;
 		bool using_full_reset;
+		char *tmp;
 
 		device = drm_open_driver(DRIVER_INTEL);
 		devid = intel_get_drm_devid(device);
@@ -922,6 +923,12 @@ igt_main
 			      "No reset stats ioctl support. Too old kernel?\n");
 		igt_require_f(using_full_reset,
 			      "Full GPU reset is not enabled. Is enable_hangcheck set?\n");
+
+		/* Don't allow request watchdog to interfere */
+		tmp = __igt_params_get(device, "request_timeout_ms");
+		if (tmp && atoi(tmp))
+			igt_params_save_and_set(device, "request_timeout_ms", "%u", 0);
+		free(tmp);
 	}
 
 	igt_subtest("params")
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Intel-gfx] [PATCH i-g-t] tests/gem_reset_stats: Don't allow request watchdog to interfere
  2023-04-13 14:36 [Intel-gfx] [PATCH i-g-t] tests/gem_reset_stats: Don't allow request watchdog to interfere Janusz Krzysztofik
@ 2023-04-13 15:31 ` Andrzej Hajda
  0 siblings, 0 replies; 2+ messages in thread
From: Andrzej Hajda @ 2023-04-13 15:31 UTC (permalink / raw)
  To: Janusz Krzysztofik, igt-dev; +Cc: intel-gfx, Chris Wilson, Nirmoy Das



On 13.04.2023 16:36, Janusz Krzysztofik wrote:
> A user reported recently that some subtests are failing.  The test was
> blocklisted in 2018, so we've lost CI feedback on its results since then.
>
> In 2021, request watchdog with 20 seconds timeout was introduced to i915.
> Kernel logs from failed subtest runs indicate that the request watchdog
> interfers with engine heartbeat and request preemption used by the test
> for exercising reset statistics.
>
> Disable request watchdog during the test execution.
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8310
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> ---
>   tests/i915/gem_reset_stats.c | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/tests/i915/gem_reset_stats.c b/tests/i915/gem_reset_stats.c
> index baa101517d..7b003d88b6 100644
> --- a/tests/i915/gem_reset_stats.c
> +++ b/tests/i915/gem_reset_stats.c
> @@ -906,6 +906,7 @@ igt_main
>   	igt_fixture {
>   		bool has_reset_stats;
>   		bool using_full_reset;
> +		char *tmp;
>   
>   		device = drm_open_driver(DRIVER_INTEL);
>   		devid = intel_get_drm_devid(device);
> @@ -922,6 +923,12 @@ igt_main
>   			      "No reset stats ioctl support. Too old kernel?\n");
>   		igt_require_f(using_full_reset,
>   			      "Full GPU reset is not enabled. Is enable_hangcheck set?\n");
> +
> +		/* Don't allow request watchdog to interfere */
> +		tmp = __igt_params_get(device, "request_timeout_ms");

With presence of igt_params_scanf it would be simpler.

Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>

Regards
Andrzej

> +		if (tmp && atoi(tmp))
> +			igt_params_save_and_set(device, "request_timeout_ms", "%u", 0);
> +		free(tmp);
>   	}
>   
>   	igt_subtest("params")


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-13 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13 14:36 [Intel-gfx] [PATCH i-g-t] tests/gem_reset_stats: Don't allow request watchdog to interfere Janusz Krzysztofik
2023-04-13 15:31 ` Andrzej Hajda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox