All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/selftests: Flush the old heartbeat more gently
@ 2020-10-19 11:14 Chris Wilson
  2020-10-19 12:31 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Chris Wilson @ 2020-10-19 11:14 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson

In order to test how fast the heartbeat can respond, we measure with the
interval set to its minimum. Before we measure though, we want to be
sure we start with a fresh pulse, and so wait until any old one is
complete. During that wait though, we were continually flushing the
work, and so continually re-evaluating to see if the pulse was complete,
and each attempt would count as an unresponsive system. If the engine
did not complete the request in the couple of busy-spins, it would flag
an error. This is unfortunate, so let's not busy-spin waiting for the
old heartbeat, but terminate it and start afresh.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 .../gpu/drm/i915/gt/selftest_engine_heartbeat.c    | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
index e73854dd2fe0..d64ea0b4b493 100644
--- a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
+++ b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
@@ -210,17 +210,15 @@ static int __live_heartbeat_fast(struct intel_engine_cs *engine)
 
 	intel_engine_pm_get(engine);
 
-	err = intel_engine_set_heartbeat(engine, 1);
-	if (err)
-		goto err_pm;
-
 	for (i = 0; i < ARRAY_SIZE(times); i++) {
-		/* Manufacture a tick */
 		do {
-			while (READ_ONCE(engine->heartbeat.systole))
-				flush_delayed_work(&engine->heartbeat.work);
+			/* Manufacture a tick */
+			intel_engine_park_heartbeat(engine);
+			engine->serial++; /*  pretend we are not idle! */
+			err = intel_engine_set_heartbeat(engine, 1);
+			if (err)
+				goto err_pm;
 
-			engine->serial++; /* quick, pretend we are not idle! */
 			flush_delayed_work(&engine->heartbeat.work);
 			if (!delayed_work_pending(&engine->heartbeat.work)) {
 				pr_err("%s: heartbeat did not start\n",
-- 
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] 8+ messages in thread

end of thread, other threads:[~2020-10-21 17:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 11:14 [Intel-gfx] [PATCH] drm/i915/selftests: Flush the old heartbeat more gently Chris Wilson
2020-10-19 12:31 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2020-10-19 14:28 ` [Intel-gfx] [PATCH v2] " Chris Wilson
2020-10-21 17:57   ` Mika Kuoppala
2020-10-19 15:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: Flush the old heartbeat more gently (rev2) Patchwork
2020-10-19 16:25 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-10-20 12:54 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: Flush the old heartbeat more gently (rev3) Patchwork
2020-10-20 16:31 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.