diff options
author | Thomas Wood <thomas.wood@intel.com> | 2014-12-08 11:12:51 +0000 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2014-12-11 17:57:03 +0000 |
commit | 42b02c284ed24871528df8f1b3eaad7fe1554fd9 (patch) | |
tree | aa5401462dbe77a208c7fef2c04793dd5bac9d11 /lib/igt_aux.h | |
parent | 5fe9c88bdad9bf54013b58f2324b7b47d92ca09d (diff) |
lib: add a function to lock memory into RAM
Add a function to lock memory into RAM and use it in the
gem_tiled_swapping test to reduce the amount of allocated memory
required to force swapping. This also reduces the amount of time
required for the test to complete, since the data set is smaller.
The following durations were recorded with gem_tiled_swapping on a
haswell system before the change:
Subtest non-threaded: SUCCESS (55.889s)
Subtest threaded: SUCCESS (810.532s)
and after:
Subtest non-threaded: SUCCESS (11.804s)
Subtest threaded: SUCCESS (268.336s)
v2: add various assertions and requirements and make sure
gem_tiled_swapping works on systems with less RAM (Daniel Vetter)
v3: fix allocation size calculation
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'lib/igt_aux.h')
-rw-r--r-- | lib/igt_aux.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/igt_aux.h b/lib/igt_aux.h index 63e1b06a..c420b3ff 100644 --- a/lib/igt_aux.h +++ b/lib/igt_aux.h @@ -96,4 +96,7 @@ void intel_require_memory(uint32_t count, uint32_t size, unsigned mode); (b) = _tmp; \ } while (0) +void igt_lock_mem(size_t size); +void igt_unlock_mem(void); + #endif /* IGT_AUX_H */ |