diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-06 09:02:16 +0100 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-08 16:34:35 +0100 |
| commit | a0788eeaad256df29e51dfaf58b7ebbd13d62bd4 (patch) | |
| tree | a639c189dfc5bd7553f9a966c1ad3f10b6814479 /tests | |
| parent | 35d81d01b1599b4bc4df0e09e25f6f531eed4f8a (diff) | |
i915/gem_persistent_relocs: Don't call DROP_IDLE in the middle of submitting
To actually DROP_IDLE means that we have to wait for ongoing submission,
and any new concurrently submitted, i.e. it should only be called during
single-threaded submission to ensure the GPU is idle before the new
action.
v2: Also include SHRINK for thrash-all-the-things, and find a dupe in
gem_reloc_vs_gpu.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/i915/gem_persistent_relocs.c | 9 | ||||
| -rw-r--r-- | tests/i915/gem_reloc_vs_gpu.c | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/tests/i915/gem_persistent_relocs.c b/tests/i915/gem_persistent_relocs.c index 452fe686..dff4e9a7 100644 --- a/tests/i915/gem_persistent_relocs.c +++ b/tests/i915/gem_persistent_relocs.c @@ -281,10 +281,13 @@ static void do_forked_test(int fd, unsigned flags) struct igt_helper_process thrasher = {}; if (flags & (THRASH | THRASH_INACTIVE)) { - uint64_t val = (flags & THRASH_INACTIVE) ? - (DROP_RETIRE | DROP_BOUND | DROP_UNBOUND) : DROP_ALL; - igt_fork_helper(&thrasher) { + uint64_t val; + + val = DROP_RETIRE | DROP_BOUND | DROP_UNBOUND; + if (!(flags & THRASH_INACTIVE)) + val |= DROP_ACTIVE | DROP_SHRINK_ALL; + while (1) { usleep(1000); igt_drop_caches_set(fd, val); diff --git a/tests/i915/gem_reloc_vs_gpu.c b/tests/i915/gem_reloc_vs_gpu.c index d421e434..328730a9 100644 --- a/tests/i915/gem_reloc_vs_gpu.c +++ b/tests/i915/gem_reloc_vs_gpu.c @@ -258,10 +258,13 @@ static void do_forked_test(int fd, unsigned flags) igt_require_hang_ring(fd, I915_EXEC_BLT); if (flags & (THRASH | THRASH_INACTIVE)) { - uint64_t val = (flags & THRASH_INACTIVE) ? - (DROP_RETIRE | DROP_BOUND | DROP_UNBOUND) : DROP_ALL; - igt_fork_helper(&thrasher) { + uint64_t val; + + val = DROP_RETIRE | DROP_BOUND | DROP_UNBOUND; + if (!(flags & THRASH_INACTIVE)) + val |= DROP_ACTIVE | DROP_SHRINK_ALL; + while (1) { usleep(1000); igt_drop_caches_set(fd, val); |
