From e8eb9afd4c53e67d834f520a42a641adb874a463 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 8 Mar 2017 13:09:00 +0000 Subject: igt: Exercise the shrinker Introduce a new fork helper that spawns a process that just repeatedly calls i915_gem_shrink_all() and watch what happens as we try to use objects that have been shrunk. Signed-off-by: Chris Wilson --- lib/igt_debugfs.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/igt_debugfs.h') diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index 5587ad40..aa59f8a8 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -169,6 +169,13 @@ void igt_require_hpd_storm_ctl(void); * Also drop freed objects. */ #define DROP_FREED 0x10 +/** + * DROP_SHRINK_ALL: + * + * Force all unpinned buffers to be evicted from their GTT and returned to the + * system. + */ +#define DROP_SHRINK_ALL 0x20 /** * DROP_ALL: * @@ -176,10 +183,12 @@ void igt_require_hpd_storm_ctl(void); */ #define DROP_ALL (DROP_UNBOUND | \ DROP_BOUND | \ + DROP_SHRINK_ALL | \ DROP_RETIRE | \ DROP_ACTIVE | \ DROP_FREED) +bool igt_drop_caches_has(uint64_t val); void igt_drop_caches_set(uint64_t val); /* -- cgit v1.2.3