android_kernel_motorola_sm6375/kernel/power
Repository files (latest commit first)
Filename Latest commit message Latest commit date
KAMEZAWA Hiroyuki d2997b1042 hibernation: freeze swap at hibernation
When taking a memory snapshot in hibernate_snapshot(), all (directly
called) memory allocations use GFP_ATOMIC.  Hence swap misusage during
hibernation never occurs.

But from a pessimistic point of view, there is no guarantee that no page
allcation has __GFP_WAIT.  It is better to have a global indication "we
enter hibernation, don't use swap!".

This patch tries to freeze new-swap-allocation during hibernation.  (All
user processes are frozenm so swapin is not a concern).

This way, no updates will happen to swap_map[] between
hibernate_snapshot() and save_image().  Swap is thawed when swsusp_free()
is called.  We can be assured that swap corruption will not occur.

Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Ondrej Zary <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2010-08-09 20:45:04 -07:00
..
block_io.c PM / Hibernate: Fix block_io.c printk warning 2010-05-10 23:08:18 +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
process.c workqueue: reimplement workqueue freeze using max_active 2010-06-29 10:07:12 +02:00
snapshot.c hibernation: freeze swap at hibernation 2010-08-09 20:45:04 -07:00
suspend.c PM / Suspend: Fix ordering of calls in suspend error paths 2010-07-19 02:00:35 +02:00
suspend_test.c PM: Make warning in suspend_test_finish() less likely to happen 2009-10-22 08:23:45 +09: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