linux-kernel-test/kernel/power
Rafael J. Wysocki 6715045ddc PM / Hibernate: Avoid hitting OOM during preallocation of memory
There is a problem in hibernate_preallocate_memory() that it calls
preallocate_image_memory() with an argument that may be greater than
the total number of available non-highmem memory pages.  If that's
the case, the OOM condition is guaranteed to trigger, which in turn
can cause significant slowdown to occur during hibernation.

To avoid that, make preallocate_image_memory() adjust its argument
before calling preallocate_image_pages(), so that the total number of
saveable non-highem pages left is not less than the minimum size of
a hibernation image.  Change hibernate_preallocate_memory() to try to
allocate from highmem if the number of pages allocated by
preallocate_image_memory() is too low.

Modify free_unnecessary_pages() to take all possible memory
allocation patterns into account.

Reported-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: M. Vefa Bicakci <bicave@superonline.com>
2010-09-11 21:03:53 +02:00
..
block_io.c block: unify flags for struct bio and struct request 2010-08-07 18:20:39 +02:00
console.c vt: introduce and use vt_kmsg_redirect() function 2009-12-15 08:53:28 -08:00
hibernate.c hibernation: freeze swap at hibernation 2010-08-09 20:45:04 -07:00
Kconfig suspend: Move NVS save/restore code to generic suspend functionality 2010-06-10 11:02:34 -04:00
main.c PM: Make it possible to avoid races between wakeup and system sleep 2010-07-19 01:58:48 +02:00
Makefile suspend: Move NVS save/restore code to generic suspend functionality 2010-06-10 11:02:34 -04:00
nvs.c suspend: Move NVS save/restore code to generic suspend functionality 2010-06-10 11:02:34 -04:00
power.h PM / Hibernate: Separate block_io 2010-05-10 23:08:18 +02:00
poweroff.c Input: sysrq - drop tty argument from sysrq ops handlers 2010-08-19 22:07:06 -07:00
process.c workqueue: reimplement workqueue freeze using max_active 2010-06-29 10:07:12 +02:00
snapshot.c PM / Hibernate: Avoid hitting OOM during preallocation of memory 2010-09-11 21:03:53 +02:00
suspend_test.c PM: Make warning in suspend_test_finish() less likely to happen 2009-10-22 08:23:45 +09:00
suspend.c PM / Suspend: Fix ordering of calls in suspend error paths 2010-07-19 02:00:35 +02:00
swap.c hibernation: freeze swap at hibernation 2010-08-09 20:45:04 -07:00
user.c PM / Hibernate: Snapshot cleanup 2010-05-10 23:08:17 +02:00