Files
ubports_kernel_google_msm/include/linux
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 <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Hugh Dickins <hughd@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-09 20:45:04 -07:00
..
2010-07-31 14:20:02 +01:00
2010-08-02 15:03:21 -03:00
2010-08-05 13:26:20 +01:00
2010-06-04 16:00:42 -04:00
2010-06-15 09:56:01 +10:00
2010-06-24 21:30:09 -07:00
2010-08-06 15:36:47 -05:00
2010-08-04 11:00:45 +02:00
2010-08-05 09:22:31 -05:00
2010-07-12 14:41:40 +02:00
2010-07-19 11:54:16 +02:00
2010-06-16 18:08:13 +02:00
2010-06-03 03:21:52 -07:00
2010-06-03 03:21:52 -07:00
2010-06-03 03:21:52 -07:00
2010-06-03 03:21:52 -07:00
2010-06-03 03:21:52 -07:00
2010-06-23 13:16:38 -07:00
2010-06-22 08:07:01 +02:00
2010-07-19 22:01:26 -07:00
2010-06-03 03:21:52 -07:00
2010-08-09 20:44:58 -07:00
2010-06-29 10:07:09 +02:00
2010-08-02 06:39:44 +03:00
2010-08-01 10:47:00 +03:00
2010-07-06 13:45:24 -04:00
2010-06-16 18:03:15 +02:00
2010-07-14 17:14:00 +10:00
2010-08-09 20:45:02 -07:00
2010-06-03 03:21:52 -07:00
2010-08-09 20:45:00 -07:00
2010-06-03 03:21:52 -07:00
2010-06-03 03:21:52 -07:00
2010-06-03 03:21:52 -07:00
2010-07-02 21:59:08 -07:00
2010-07-05 16:14:52 -06:00
2010-07-05 16:14:25 -06:00
2010-07-24 09:58:22 -06:00
2010-08-09 20:45:02 -07:00
2010-07-31 19:53:06 +08:00
2010-07-30 09:29:35 -07:00
2010-06-03 03:21:52 -07:00
2010-07-19 01:58:48 +02:00
2010-07-19 01:58:48 +02:00
2010-06-03 03:21:52 -07:00
2010-07-19 11:02:51 +02:00
2010-07-22 13:46:21 -07:00
2010-08-09 20:45:02 -07:00
2010-06-03 03:21:52 -07:00
2010-08-03 00:31:48 -07:00
2010-06-16 14:55:35 -07:00
2010-08-09 20:45:04 -07:00
2010-07-21 21:43:06 +02:00
2010-08-06 10:37:02 -04:00
2010-08-02 10:37:17 -05:00
2010-06-03 03:21:52 -07:00