[PATCH igt] igt/gem_ppgtt: Flush the driver to idle before counting leaks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a cunning plan to make the vma open/close lazy to cache frequent
reallocations (as buffers are passed between applications, e.g. DRI).
However, this will mean that we will not be immediately closing vma and
so need to tell the kernel to process the idle handlers before checking
for leaks.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
 tests/gem_ppgtt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/gem_ppgtt.c b/tests/gem_ppgtt.c
index bed95db83..575b0e9d3 100644
--- a/tests/gem_ppgtt.c
+++ b/tests/gem_ppgtt.c
@@ -236,7 +236,7 @@ static void flink_and_close(void)
 	gem_sync(fd2, flinked_bo);
 	gem_close(fd2, flinked_bo);
 
-	igt_drop_caches_set(fd, DROP_RETIRE);
+	igt_drop_caches_set(fd, DROP_RETIRE | DROP_IDLE);
 
 	/* the flinked bo VMA should have been cleared now, so a new bo of the
 	 * same size should get the same offset
@@ -286,7 +286,7 @@ static void flink_and_exit(void)
 	exec_and_get_offset(fd3, gem_create(fd3, 4096));
 	close(fd3);
 
-	igt_drop_caches_set(fd, DROP_ACTIVE | DROP_RETIRE);
+	igt_drop_caches_set(fd, DROP_ACTIVE | DROP_RETIRE | DROP_IDLE);
 	igt_assert(!igt_debugfs_search(fd, "i915_gem_gtt", match));
 
 	close(fd);
-- 
2.17.0

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux