[igt-dev] [igt PATCH 1/1] igt at i915_suspend@shrink faster

Caz Yokoyama caz at caz-nuc.ra.intel.com
Wed Feb 20 01:13:16 UTC 2019


igt at i915_suspend@shrink runs 25 sec instead of 90 sec on my NUC which has
2GB of memory. The child process which is created by igt_fork() updates
pinnable memory size, (*can_mlock). Parent process mlocks at the end of
"for loop" when the child process finds pinnable memory size in 4kb
boundary. This patch also reduces the chance of dying entire test process
because the parent process mclocks the memory where we already know it is
pinnable.

Signed-off-by: Caz Yokoyama <caz at caz-nuc.ra.intel.com>
---
 lib/intel_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/intel_os.c b/lib/intel_os.c
index e1e31e23..077d6c13 100644
--- a/lib/intel_os.c
+++ b/lib/intel_os.c
@@ -265,8 +265,8 @@ intel_get_total_pinnable_mem(void)
 			}
 		}
 		__igt_waitchildren();
-		igt_assert(!mlock(can_mlock, *can_mlock));
 	}
+	igt_assert(!mlock(can_mlock, *can_mlock));
 
 out:
 	ret = *can_mlock;
-- 
2.17.1



More information about the igt-dev mailing list