[Intel-gfx] [PATCH i-g-t v2] tests/gem_eio: Never re-use contexts which were in the middle of GPU reset

Chris Wilson chris at chris-wilson.co.uk
Thu Mar 29 09:46:11 UTC 2018


Quoting Tvrtko Ursulin (2018-03-29 10:34:40)
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Contexts executing when reset triggers are potentialy corrupt so trying to
> use them from a subsequent test (like the default context) can hang the
> GPU or even the driver.
> 
> Workaround that by always creating a dedicated context which will be
> running when GPU reset happens.
> 
> v2:
>  * Export and use gem_reopen_device so the test works on old gens as well.
>    (Chris Wilson)
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Matches what I wrote^W imagined (as if you believe I would have bothered
with the export rather than cut'n'paste ;)

Have a conditional
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
on the condition that you throw in a test that reused a few contexts a few
times. I think something like

for (nctx in prime(1, next_prime(MAX_ELSP))) {
	while (loop) {
		for (ctx = nctx) {
			for_each_engine() {
				add-spin(ctx, engine);
			}
			end-spin.
		}
		// something, something inject wedge
	}

?
-Chris


More information about the Intel-gfx mailing list