summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-05-02 09:15:23 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-05-02 09:21:50 +0100
commit691b76a84bd0f49130ae80e85b5b7553a2e1d9ba (patch)
treeaa193352c6415cd69e86c0bbf9363bafed8c44b5
parent805a05caaeb529732cbc01b2f3a9b6fc6e7cb3da (diff)
igt/gem_exec_flush: Use a cacheline stride
Look at different cachelines on each pass, otherwise each group of 16 flush the same cachline. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--tests/gem_exec_flush.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c
index 347a79fd..0aa84fe0 100644
--- a/tests/gem_exec_flush.c
+++ b/tests/gem_exec_flush.c
@@ -152,7 +152,10 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
igt_timeout(timeout) {
bool xor = (cycles >> 10) & 1;
- i = cycles++ % 1024;
+ int idx = cycles++ % 1024;
+
+ /* Inspect a different cacheline each iteration */
+ i = 16 * (idx % 64) + (idx / 64);
obj[1].relocs_ptr = (uintptr_t)&reloc0[i];
obj[2].relocs_ptr = (uintptr_t)&reloc1[i];