igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] igt/gem_exec_await: Flush vm caches between runs
@ 2018-09-12 11:14 Chris Wilson
  2018-09-12 12:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2018-09-12 16:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2018-09-12 11:14 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

On allocating a request, we apply some backpressure if we fail to
allocate a request. The backpressure we apply involves waiting for the
device to idle, causing a stall on the clients (trying to throttle heavy
allocators) and as we may be inside a plugged critical section, the only
way to idle the GPU is by waiting for hangcheck to kick in.

Try to avoid the allocation failure by trimming the VM caches between
iterations.

References: https://bugs.freedesktop.org/show_bug.cgi?id=106680
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/gem_exec_await.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/gem_exec_await.c b/tests/gem_exec_await.c
index 5cfeb8ec8..b9a2c6105 100644
--- a/tests/gem_exec_await.c
+++ b/tests/gem_exec_await.c
@@ -147,6 +147,13 @@ static void wide(int fd, int ring_size, int timeout, unsigned int flags)
 	count = 0;
 	igt_until_timeout(timeout) {
 		struct timespec start, now;
+
+		/*
+		 * Flush all caches between runs, we do not want to encounter
+		 * reclaim in the middle of the plugged critical section.
+		 */
+		intel_purge_vm_caches(fd);
+
 		for (unsigned e = 0; e < nengine; e++) {
 			uint64_t address;
 			int i;
-- 
2.19.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2018-09-12 16:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-12 11:14 [igt-dev] [PATCH i-g-t] igt/gem_exec_await: Flush vm caches between runs Chris Wilson
2018-09-12 12:25 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-09-12 16:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).