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>
This commit is contained in:
Chris Wilson 2016-05-02 09:15:23 +01:00
parent 805a05caae
commit 691b76a84b

View File

@ -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];