diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-05-02 09:15:23 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-05-02 09:21:50 +0100 |
commit | 691b76a84bd0f49130ae80e85b5b7553a2e1d9ba (patch) | |
tree | aa193352c6415cd69e86c0bbf9363bafed8c44b5 /tests/gem_exec_flush.c | |
parent | 805a05caaeb529732cbc01b2f3a9b6fc6e7cb3da (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>
Diffstat (limited to 'tests/gem_exec_flush.c')
-rw-r--r-- | tests/gem_exec_flush.c | 5 |
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]; |