[Intel-gfx] [PATCH igt 1/2] lib/dummyload: Wrap global list inside its own mutex

Chris Wilson chris at chris-wilson.co.uk
Tue Dec 12 15:35:25 UTC 2017


Quoting Tvrtko Ursulin (2017-12-12 15:19:03)
> 
> On 12/12/2017 12:21, Chris Wilson wrote:
> > Give the list a mutex, for we try to iterate over it from many a random
> > context.
> 
> Isn't it only tests and their exit handlers, so already serialized?

No, it can be used from threads as well.
 
> Should spin batches instead install an exit handler?

Problem being ordering. Since other exit handlers may depend upon GPU
activity, cancelling that GPU activity has to be done first. If we
install an exit handler for an early spin batch, that will be run last,
causing a GPU hang in the other handlers.

Furthermore, the exit handlers are not run after subtests; there is no
setup/teardown procedure other than trying to fit such into
igt_subtest_group + igt_fixture, which isn't always feasible.
-Chris


More information about the Intel-gfx mailing list