diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-29 09:25:44 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-29 09:27:28 +0000 |
commit | ccb1b5888dd18a8227a4e09a5674abca15931c87 (patch) | |
tree | 432643bc30953c96bd2ed6b07e48f902cceb6238 /tests | |
parent | 51783fc7f9aacd20f13bd7a12c5eb9194176ab14 (diff) |
gem_close_race: Bump the workload
Emit more work per client and many more clients in order to increase the
chance of racing i915_gem_release() and i915_gem_retire_requests()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_close_race.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/gem_close_race.c b/tests/gem_close_race.c index 92f2920b..7d76d5d0 100644 --- a/tests/gem_close_race.c +++ b/tests/gem_close_race.c @@ -54,6 +54,7 @@ static void selfcopy(int fd, uint32_t handle) struct drm_i915_gem_exec_object2 gem_exec[2]; struct drm_i915_gem_execbuffer2 execbuf; uint32_t buf[10]; + int loop; memset(reloc, 0, sizeof(reloc)); memset(gem_exec, 0, sizeof(gem_exec)); @@ -62,14 +63,14 @@ static void selfcopy(int fd, uint32_t handle) buf[0] = COPY_BLT_CMD | BLT_WRITE_ALPHA | BLT_WRITE_RGB; buf[1] = 0xcc << 16 | 1 << 25 | 1 << 24 | (4*1024); buf[2] = 0; - buf[3] = 1024 << 16 | 1024; + buf[3] = 512 << 16 | 1024; buf[4] = 0; reloc[0].offset = 4 * sizeof(uint32_t); reloc[0].target_handle = handle; reloc[0].read_domains = I915_GEM_DOMAIN_RENDER; reloc[0].write_domain = I915_GEM_DOMAIN_RENDER; - buf[5] = 0; + buf[5] = 512 << 16; buf[6] = 4*1024; buf[7] = 0; reloc[1].offset = 7 * sizeof(uint32_t); @@ -94,7 +95,8 @@ static void selfcopy(int fd, uint32_t handle) if (HAS_BLT_RING(intel_get_drm_devid(fd))) execbuf.flags |= I915_EXEC_BLT; - gem_execbuf(fd, &execbuf); + for (loop = 30; loop--; ) + gem_execbuf(fd, &execbuf); } static uint32_t load(int fd) @@ -118,7 +120,7 @@ static void run(int child) igt_assert(fd != -1); handle = load(fd); - if (child & 1) + if ((child & 63) == 63) gem_read(fd, handle, 0, &handle, sizeof(handle)); } @@ -130,7 +132,7 @@ int main(int argc, char *argv[]) sprintf(device, "/dev/dri/card%d", drm_get_card()); igt_subtest("gem-close-race") { - igt_fork(child, 100) + igt_fork(child, 2000) run(child); igt_waitchildren(); } |