Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/gt: Track the most recent pulse for the heartbeat
@ 2020-10-02 14:46 Chris Wilson
  2020-10-02 15:26 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Chris Wilson @ 2020-10-02 14:46 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson

Since we track the idle_pulse for flushing the barriers and avoid
re-emitting the pulse upon idling if no futher action is required, this
also impacts the heartbeat. Before emitting a fresh heartbeat, we look
at the engine idle status and assume that if the pulse was the last
request emitted along the heartbeat, the engine is idling and a
heartbeat pulse not required. This assumption fails, but we can reuse
the idle pulse as the heartbeat if we are yet to emit one, and so track
the status of that pulse for our engine health check.

This impacts tgl/rcs0 as we rely on the heartbeat for our healthcheck for
the normal preemption detection mechanism is disabled by default.

Testcase: igt/gem_exec_schedule/preempt-hang/rcs0 #tgl
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
index 5067d0524d4b..f355efc9108c 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
@@ -41,6 +41,8 @@ static void idle_pulse(struct intel_engine_cs *engine, struct i915_request *rq)
 {
 	engine->wakeref_serial = READ_ONCE(engine->serial) + 1;
 	i915_request_add_active_barriers(rq);
+	if (!engine->heartbeat.systole && engine->i915->params.enable_hangcheck)
+		engine->heartbeat.systole = i915_request_get(rq);
 }
 
 static void show_heartbeat(const struct i915_request *rq,
@@ -144,8 +146,6 @@ static void heartbeat(struct work_struct *wrk)
 		goto unlock;
 
 	idle_pulse(engine, rq);
-	if (engine->i915->params.enable_hangcheck)
-		engine->heartbeat.systole = i915_request_get(rq);
 
 	__i915_request_commit(rq);
 	__i915_request_queue(rq, &attr);
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-10-07  8:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-02 14:46 [Intel-gfx] [PATCH] drm/i915/gt: Track the most recent pulse for the heartbeat Chris Wilson
2020-10-02 15:26 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2020-10-02 15:32 ` [Intel-gfx] [PATCH v2] " Chris Wilson
2020-10-06  9:46   ` [Intel-gfx] [PATCH v3] " Chris Wilson
2020-10-07  8:40     ` Mika Kuoppala
2020-10-02 16:18 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Track the most recent pulse for the heartbeat (rev2) Patchwork
2020-10-02 19:59 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-10-06 14:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Track the most recent pulse for the heartbeat (rev3) Patchwork
2020-10-06 18:39 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox