diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-05-24 13:06:01 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-06-08 13:01:17 +0100 |
commit | 7b6838781441cfbc7f6c18f421f127dfb02b44cf (patch) | |
tree | a5245ffa84a99d583409964b6c084cd8ffc30a5c /lib/igt_core.h | |
parent | 093fa482371795c3aa246509994eb21907f501b9 (diff) |
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 <chris@chris-wilson.co.uk>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
Diffstat (limited to 'lib/igt_core.h')
-rw-r--r-- | lib/igt_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
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); |