]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Cancel outstanding work after disabling heartbeats on an engine
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 28 Sep 2020 22:15:08 +0000 (23:15 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 29 Sep 2020 08:01:03 +0000 (09:01 +0100)
commitd2643c8ee1b57fe772d804bd52e7653b92949b09
treec5f3d117918a947242e32ea44aee022cea5034f6
parent21367803b06622e606c1e7d440af8b618afc5e94
drm/i915: Cancel outstanding work after disabling heartbeats on an engine

We only allow persistent requests to remain on the GPU past the closure
of their containing context (and process) so long as they are continuously
checked for hangs or allow other requests to preempt them, as we need to
ensure forward progress of the system. If we allow persistent contexts
to remain on the system after the the hangcheck mechanism is disabled,
the system may grind to a halt. On disabling the mechanism, we sent a
pulse along the engine to remove all executing contexts from the engine
which would check for hung contexts -- but we did not prevent those
contexts from being resubmitted if they survived the final hangcheck.

Fixes: aafd5a9f6737 ("drm/i915/gt: Expose heartbeat interval via sysfs")
Testcase: igt/gem_ctx_persistence/heartbeat-stop
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: <stable@vger.kernel.org> # v5.7+
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Acked-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200928221510.26044-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_engine.h
drivers/gpu/drm/i915/i915_request.c