Re: [Intel-gfx] [PATCH] drm/i915/selftests: Drain the freedlists between exec passes

2019-07-04 Thread Matthew Auld
On Thu, 4 Jul 2019 at 17:53, Chris Wilson  wrote:
>
> During the context execution tests, we issue a lot of work and discard a
> lot of objects without releasing the lock and allowing the background
> reaper to free those objects. Insert a small break between each pass to
> flush the worker.
>
> Signed-off-by: Chris Wilson 
Reviewed-by: Matthew Auld 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH] drm/i915/selftests: Drain the freedlists between exec passes

2019-07-04 Thread Chris Wilson
During the context execution tests, we issue a lot of work and discard a
lot of objects without releasing the lock and allowing the background
reaper to free those objects. Insert a small break between each pass to
flush the worker.

Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c 
b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
index a23c6df9b9f4..91d13f019265 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
@@ -562,6 +562,8 @@ static int igt_ctx_exec(void *arg)
mock_file_free(i915, file);
if (err)
return err;
+
+   i915_gem_drain_freed_objects(i915);
}
 
return 0;
@@ -672,6 +674,10 @@ static int igt_shared_ctx_exec(void *arg)
 
dw += rem;
}
+
+   mutex_unlock(&i915->drm.struct_mutex);
+   i915_gem_drain_freed_objects(i915);
+   mutex_lock(&i915->drm.struct_mutex);
}
 out_test:
if (igt_live_test_end(&t))
-- 
2.20.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx