linux/kernel/power
Hugh Dickins 910321ea81 swap: revert special hibernation allocation
Please revert 2.6.36-rc commit d2997b1042
"hibernation: freeze swap at hibernation".  It complicated matters by
adding a second swap allocation path, just for hibernation; without in any
way fixing the issue that it was intended to address - page reclaim after
fixing the hibernation image might free swap from a page already imaged as
swapcache, letting its swap be reallocated to store a different page of
the image: resulting in data corruption if the imaged page were freed as
clean then swapped back in.  Pages freed to si->swap_map were still in
danger of being reallocated by the alternative allocation path.

I guess it inadvertently fixed slow SSD swap allocation for hibernation,
as reported by Nigel Cunningham: by missing out the discards that occur on
the usual swap allocation path; but that was unintentional, and needs a
separate fix.

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Ondrej Zary <linux@rainbow-software.org>
Cc: Andrea Gelmini <andrea.gelmini@gmail.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Nigel Cunningham <nigel@tuxonice.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-09 18:57:25 -07: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 swap: revert special hibernation allocation 2010-09-09 18:57:25 -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 swap: revert special hibernation allocation 2010-09-09 18:57:25 -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 swap: revert special hibernation allocation 2010-09-09 18:57:25 -07:00
user.c PM / Hibernate: Snapshot cleanup 2010-05-10 23:08:17 +02:00