From 7b6838781441cfbc7f6c18f421f127dfb02b44cf Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 24 May 2018 13:06:01 +0100 Subject: igt/drv_suspend: Suspend under memory pressure Recently we discovered that we have a race between swapping and suspend in our resume path (we might be trying to page in an object after disabling the block devices). Let's try to exercise that by exhausting all of system memory before suspend. v2: Explicitly share the large memory area on forking to avoid running out of memory inside the suspend helpers (for they fork!) References: https://bugs.freedesktop.org/show_bug.cgi?id=106640 Signed-off-by: Chris Wilson Cc: Tomi Sarvela Reviewed-by: Antonio Argenziano --- lib/igt_core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/igt_core.h') diff --git a/lib/igt_core.h b/lib/igt_core.h index bf8cd66c..a73b0649 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -742,6 +742,7 @@ bool __igt_fork(void); for (int child = 0; child < (num_children); child++) \ for (; __igt_fork(); exit(0)) void igt_child_done(pid_t pid); +int __igt_waitchildren(void); void igt_waitchildren(void); void igt_waitchildren_timeout(int seconds, const char *reason); -- cgit v1.2.3