Skip to contentSkip to conversation

tests/gem_exec_gttfill: Fix require memory assertion and tune down the timeout test for BAT.

PATCH In review Marius Vlad 2 participants 2 messages May 20, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/gem_exec_gttfill: Fix require memory assertion and tune down the timeout test for BAT.

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.

---
 tests/gem_exec_gttfill.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/gem_exec_gttfill.c +2 -2
index 5921923..4778e4d 100644
@@ -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)
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 3 lines · Marius Vlad

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.

Quoted 2 lines

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.

Quoted 1 line

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

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx