linux_old1/kernel/power
Rafael J. Wysocki 968808b895 [PATCH] swsusp: use less memory during resume
Make swsusp allocate only as much memory as needed to store the image data
and metadata during resume.

Without this patch swsusp additionally allocates many page frames that will
conflict with the "original" locations of the image data and are considered
as "unsafe", treating them as "eaten" pages (ie.  allocated but unusable).

The patch makes swsusp allocate as many pages as it'll need to store the
data read from the image in one shot, creating a list of allocated "safe"
pages, and use the observation that all pages allocated by it are marked
with the PG_nosave and PG_nosave_free flags set.   Namely, when it's about
to load an image page, swsusp can check whether the page frame
corresponding to the "original" location of this page has been allocated
(ie.  if the page frame has the PG_nosave and PG_nosave_free flags set) and
if so, it can load the page directly into this page frame.   Otherwise it
uses an allocated "safe" page from the list to store the data that will be
copied to their "original" location later on.

This allows us to save many page copyings and page allocations during
resume and in the future it may allow us to load images greater than 50% of
the normal zone.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: "Pavel Machek" <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23 07:43:00 -07:00
..
Kconfig help text: SOFTWARE_SUSPEND doesn't need ACPI 2006-04-01 01:03:08 +02:00
Makefile [PATCH] swsusp: userland interface 2006-03-23 07:38:07 -08:00
console.c [PATCH] Fix build failure in recent pm_prepare_* changes. 2006-02-07 16:12:33 -08:00
disk.c [PATCH] swsusp: freeze user space processes first 2006-03-23 07:38:08 -08:00
main.c [PATCH] suspend_console() warning fix 2006-06-22 15:05:56 -07:00
pm.c [PATCH] remove kernel/power/pm.c:pm_unregister() 2006-04-14 12:25:26 -07:00
power.h [PATCH] swsusp: use less memory during resume 2006-06-23 07:43:00 -07:00
poweroff.c [PATCH] Use kernel_power_off in sysrq-o 2005-07-26 14:35:43 -07:00
process.c [PATCH] Fix suspend with traced tasks 2006-03-31 12:18:50 -08:00
smp.c [PATCH] Check if cpu can be onlined before calling smp_prepare_cpu() 2006-03-25 08:23:01 -08:00
snapshot.c [PATCH] swsusp: use less memory during resume 2006-06-23 07:43:00 -07:00
swap.c [PATCH] swswsup: return correct load_image error 2006-03-26 08:56:55 -08:00
swsusp.c [PATCH] swsusp: take lowmem reserves into account 2006-06-23 07:42:59 -07:00
user.c [PATCH] swsusp: add s2ram ioctl to userland interface 2006-03-23 07:38:08 -08:00