diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-10 20:09:26 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-10 20:10:10 +0000 |
commit | 90c883ce651dc74671086fdf8229902ebde593e7 (patch) | |
tree | bb65e63fdddc9ba32d1bcdb3ea37c834a5f61c7f /lib | |
parent | e8eb9afd4c53e67d834f520a42a641adb874a463 (diff) |
lib: Shrink all i915 caches before measuring avail memory
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/intel_os.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/intel_os.c b/lib/intel_os.c index 0f9af634..924ac7e7 100644 --- a/lib/intel_os.c +++ b/lib/intel_os.c @@ -51,6 +51,7 @@ #include "intel_io.h" #include "drmtest.h" #include "igt_aux.h" +#include "igt_debugfs.h" /** * intel_get_total_ram_mb: @@ -295,6 +296,8 @@ void intel_purge_vm_caches(void) { int fd; + igt_drop_caches_set(DROP_SHRINK_ALL); + fd = open("/proc/sys/vm/drop_caches", O_WRONLY); if (fd >= 0) { /* BIT(2): Be quiet. Cannot be combined with other operations, |