mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 07:29:42 -05:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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]> |
||
| .. | ||
| block_io.c | ||
| console.c | ||
| hibernate.c | ||
| Kconfig | ||
| main.c | ||
| Makefile | ||
| nvs.c | ||
| power.h | ||
| poweroff.c | ||
| process.c | ||
| snapshot.c | ||
| suspend.c | ||
| suspend_test.c | ||
| swap.c | ||
| user.c | ||