From 6be2dc8ddfa332d129149aa3b13db14fa2cd6c0a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 19 Feb 2019 22:17:45 +0000 Subject: lib: Incrementally mlock() As we already have the previous portion of the mmap mlocked, we only need to mlock() the fresh portion for testing available memory. v2: Fixup the uint64_t pointer arithmetric and only use a single mmap to avoid subsequent mlock fail (for reasons unknown, but bet on mm/). Signed-off-by: Chris Wilson Cc: Caz Yokoyama Reviewed-by: Caz Yokoyama --- lib/igt_aux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/igt_aux.h') diff --git a/lib/igt_aux.h b/lib/igt_aux.h index fb02c026..09b6246b 100644 --- a/lib/igt_aux.h +++ b/lib/igt_aux.h @@ -194,7 +194,7 @@ void intel_purge_vm_caches(int fd); uint64_t intel_get_avail_ram_mb(void); uint64_t intel_get_total_ram_mb(void); uint64_t intel_get_total_swap_mb(void); -size_t intel_get_total_pinnable_mem(void); +void *intel_get_total_pinnable_mem(size_t *pinned); int __intel_check_memory(uint64_t count, uint64_t size, unsigned mode, uint64_t *out_required, uint64_t *out_total); -- cgit v1.2.3