Message ID | 20180419054850.15338-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 19/04/2018 06:48, Chris Wilson wrote: > 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@chris-wilson.co.uk> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > --- > 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); > It's not interfering with test intentions so: Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Regards, Tvrtko
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);
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@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> --- tests/gem_ppgtt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)