diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-18 13:29:38 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-19 09:07:11 +0100 |
commit | abc08cba366a64a07f7f4deb167ae7d6ae059958 (patch) | |
tree | cd5dcb302b25c595f4cddfb374f80e076bd1a600 /lib/intel_os.c | |
parent | 8d03573de74ebd38d1047131a698a2068605efed (diff) |
lib: Free all internal buffers before measuring available memory
Release the internal caches (by flushing the idle_worker) to maximise the
available memory for use by tests (and to reduce sporadic skipping when
on the cusp).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'lib/intel_os.c')
-rw-r--r-- | lib/intel_os.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/intel_os.c b/lib/intel_os.c index 6e0a46b3..a77566c1 100644 --- a/lib/intel_os.c +++ b/lib/intel_os.c @@ -297,7 +297,7 @@ void intel_purge_vm_caches(int drm_fd) { int fd; - igt_drop_caches_set(drm_fd, DROP_SHRINK_ALL); + igt_drop_caches_set(drm_fd, DROP_SHRINK_ALL | DROP_IDLE | DROP_FREED); fd = open("/proc/sys/vm/drop_caches", O_WRONLY); if (fd >= 0) { |