diff mbox

[i-g-t] tests/gem_exec_gttfill: Fix require memory assertion and tune down the timeout test for BAT.

Message ID 1463763736-27880-1-git-send-email-marius.c.vlad@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Marius Vlad May 20, 2016, 5:02 p.m. UTC
There's no need to multiply the number of batches with the number of
engines as intel_require_memory() already compares against the aperture
size (count * BATCH_SIZE).
This also removes the weird assertion messages where we need
bogus amounts of RAM.

Also tune down the timeout from from 10s to 2s to speed up BAT.

CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
---
 tests/gem_exec_gttfill.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Chris Wilson May 20, 2016, 7:52 p.m. UTC | #1
On Fri, May 20, 2016 at 08:02:16PM +0300, Marius Vlad wrote:
> There's no need to multiply the number of batches with the number of
> engines as intel_require_memory() already compares against the aperture
> size (count * BATCH_SIZE).

nengines was because I first planned to allocate an array for each
engine, because I wanted each to run as independently as possible (since
we overwrite the batch if it is active, we will stall). Then I realised
the futility and overallocation since we only have the single address
space and so allocated the single array and set each engine off on a
random order to hopefully avoid them lockstepping.

> This also removes the weird assertion messages where we need
> bogus amounts of RAM.

It won't. However you put it, we need 256 exabytes to run the test on
bdw+. Unless we can constrain the per-context GTT (i.e. a constrction
flag to limit the address space to 32bits).... Or we just don't use the
allow-48bit flag and pretend that is equivalent.

> Also tune down the timeout from from 10s to 2s to speed up BAT.

It's not going to make any difference on the slowest machines, but meh.
-Chris
diff mbox

Patch

diff --git a/tests/gem_exec_gttfill.c b/tests/gem_exec_gttfill.c
index 5921923..4778e4d 100644
--- a/tests/gem_exec_gttfill.c
+++ b/tests/gem_exec_gttfill.c
@@ -144,7 +144,7 @@  static void fillgtt(int fd, unsigned ring, int timeout)
 	count = size / BATCH_SIZE + 1;
 	igt_debug("Using %'d batches to fill %'llu aperture on %d engines\n",
 		  count, (long long)size, nengine);
-	intel_require_memory(count * nengine, BATCH_SIZE, CHECK_RAM);
+	intel_require_memory(count, BATCH_SIZE, CHECK_RAM);
 
 	memset(&execbuf, 0, sizeof(execbuf));
 	execbuf.buffer_count = 1;
@@ -195,7 +195,7 @@  igt_main
 	igt_fork_hang_detector(device);
 
 	igt_subtest("basic")
-		fillgtt(device, 0, 10);
+		fillgtt(device, 0, 2);
 
 	for (e = intel_execution_engines; e->name; e++)
 		igt_subtest_f("%s", e->name)