[PATCH i-g-t] i915/perf: Stress opening of new perf streams against existing contexts

Chris Wilson chris.p.wilson at linux.intel.com
Thu Jan 12 10:30:06 UTC 2023


Quoting Janusz Krzysztofik (2023-01-11 15:27:39)
> +       for (int persistence = 0; persistence <= 1; persistence++) {
> +               igt_fork(child, sysconf(_SC_NPROCESSORS_ONLN)) {
> +                       int i915 = gem_reopen_driver(drm_fd);
> +
> +                       do {
> +                               igt_spin_t *spin;
> +                               uint32_t ctx;
> +
> +                               ctx = gem_context_create_for_engine(i915, e->class, e->instance);
> +                               gem_context_set_persistence(i915, ctx, persistence);
> +

For dg1, this needs an ahnd. Or for the kernel to recognise that this
spinner's batch didn't need relocations!

>  static unsigned
>  read_i915_module_ref(void)
>  {
> @@ -5259,6 +5316,14 @@ igt_main
>         igt_subtest("whitelisted-registers-userspace-config")
>                 test_whitelisted_registers_userspace_config();
>  
> +       igt_subtest_with_dynamic("open-race") {
> +               const struct intel_execution_engine2 *e;
> +
> +               for_each_physical_engine(drm_fd, e)
> +                       if (e->class == I915_ENGINE_CLASS_RENDER)

>From the test results, we need
	igt_dynamic_f("%s", e->name)
> +                               test_open_race(e, 5);


It did run on kbl/glk for 5s (33 perf open/close cycles) with no signs
of distress.

Something I was thinking of trying was:
	gem_context_destroy(i915, ctx);
	igt_spin_end(spin);
	gem_sync(i915, spin->handle);
	igt_spin_free(i915, spin);
which should trigger more retires.
-Chris


More information about the Intel-gfx-trybot mailing list