From 691b76a84bd0f49130ae80e85b5b7553a2e1d9ba Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 2 May 2016 09:15:23 +0100 Subject: 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 --- tests/gem_exec_flush.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/gem_exec_flush.c') 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]; -- cgit v1.2.3