All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t] i915/sysfs_heartbeat_interval: Watch out for CPU scheduler delays
@ 2020-05-13 10:47 ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2020-05-13 10:47 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev, Chris Wilson

If our CPU client is very slow to notice that the GPU spinner has
started, we may consume the full heartbeat interval without noticing.
This is bad if we are trying to test that a client that yield within the
heartbeat interval is not selected for termination.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1879
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/sysfs_heartbeat_interval.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/i915/sysfs_heartbeat_interval.c b/tests/i915/sysfs_heartbeat_interval.c
index 6d4413d62..fe0cc046c 100644
--- a/tests/i915/sysfs_heartbeat_interval.c
+++ b/tests/i915/sysfs_heartbeat_interval.c
@@ -308,8 +308,13 @@ static void client(int i915, int engine, int *ctl, int duration, int expect)
 					      IGT_SPIN_POLL_RUN |
 					      IGT_SPIN_FENCE_OUT));
 
+		/* XXX we need more precise means of limiting the spinner */
 		igt_spin_busywait_until_started(spin);
-		igt_assert_eq(sync_fence_status(spin->out_fence), 0);
+		if (sync_fence_status(spin->out_fence)) {
+			/* CPU too slow! */
+			igt_spin_free(i915, spin);
+			continue;
+		}
 
 		elapsed = measured_usleep(duration * 1000);
 		igt_spin_end(spin);
-- 
2.26.2

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

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

end of thread, other threads:[~2020-05-15 11:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 10:47 [Intel-gfx] [PATCH i-g-t] i915/sysfs_heartbeat_interval: Watch out for CPU scheduler delays Chris Wilson
2020-05-13 10:47 ` [igt-dev] " Chris Wilson
2020-05-13 11:26 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-05-13 12:59 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-05-15 11:43 ` [igt-dev] ✗ GitLab.Pipeline: 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.