]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Start kthreads before stopping
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 1 Nov 2019 08:49:40 +0000 (08:49 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 1 Nov 2019 10:12:29 +0000 (10:12 +0000)
commit1cc439b871278f670a5ad8403c60f68b3c4182fe
tree99446cddd13e1d8d9d6225de6cd7f32926c480e0
parent53a3ea6672bd73d746389b7844562cd0e7b216b8
drm/i915/selftests: Start kthreads before stopping

An interesting observation made with our parallel selftests was that on
our small/single cpu systems we would call kthread_stop() before the
kthreads were spawned. If this happens, the kthread is never run at all;
completely bypassing the test.

A simple yield() from the parent will ensure that all children have the
opportunity to start before we reap them.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191101084940.31838-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c
drivers/gpu/drm/i915/gt/selftest_hangcheck.c
drivers/gpu/drm/i915/gt/selftest_lrc.c
drivers/gpu/drm/i915/selftests/i915_request.c