OpenCloudOS-Kernel/Documentation/power
Rafael J. Wysocki 91e7c75ba9 PM: Allow drivers to allocate memory from .prepare() callbacks safely
If device drivers allocate substantial amounts of memory (above 1 MB)
in their hibernate .freeze() callbacks (or in their legacy suspend
callbcks during hibernation), the subsequent creation of hibernate
image may fail due to the lack of memory.  This is the case, because
the drivers' .freeze() callbacks are executed after the hibernate
memory preallocation has been carried out and the preallocated amount
of memory may be too small to cover the new driver allocations.
Unfortunately, the drivers' .prepare() callbacks also are executed
after the hibernate memory preallocation has completed, so they are
not suitable for allocating additional memory either.  Thus the only
way a driver can safely allocate memory during hibernation is to use
a hibernate/suspend notifier.  However, the notifiers are called
before the freezing of user space and the drivers wanting to use them
for allocating additional memory may not know how much memory needs
to be allocated at that point.

To let device drivers overcome this difficulty rework the hibernation
sequence so that the memory preallocation is carried out after the
drivers' .prepare() callbacks have been executed, so that the
.prepare() callbacks can be used for allocating additional memory
to be used by the drivers' .freeze() callbacks.  Update documentation
to match the new behavior of the code.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-05-17 23:26:00 +02:00
..
regulator regulator: Update e-mail address for Liam Girdwood 2010-09-01 12:59:34 +01:00
00-INDEX PM: Introduce library for device-specific OPPs (v7) 2010-10-17 01:57:50 +02:00
apm-acpi.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
basic-pm-debugging.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
devices.txt PM: Allow drivers to allocate memory from .prepare() callbacks safely 2011-05-17 23:26:00 +02:00
drivers-testing.txt PM: Fix references to basic-pm-debugging.txt in drivers-testing.txt 2010-12-24 15:02:41 +01:00
freezing-of-tasks.txt freezer: do not send signals to kernel threads 2007-10-18 14:37:19 -07:00
interface.txt PM / Hibernate: Make default image size depend on total RAM size 2010-10-17 01:57:43 +02:00
notifiers.txt PM: Allow drivers to allocate memory from .prepare() callbacks safely 2011-05-17 23:26:00 +02:00
opp.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
pci.txt PM/PCI: Update PCI power management documentation 2010-05-18 15:01:58 -07:00
pm_qos_interface.txt PM QOS update 2010-05-10 23:08:19 +02:00
power_supply_class.txt power_supply: Add a charge_type property, and use it for olpc driver 2009-07-02 18:14:37 +04:00
runtime_pm.txt PM: Make system-wide PM and runtime PM treat subsystems consistently 2011-03-15 00:43:17 +01:00
s2ram.txt PM: Add sysfs attr for rechecking dev hash from PM trace 2010-10-17 01:57:50 +02:00
states.txt PM: Documentation/power/states.txt: fix repetition 2011-03-15 00:43:17 +01:00
swsusp-and-swap-files.txt typo fixes 2007-10-20 01:34:40 +02:00
swsusp-dmcrypt.txt [PATCH] swsusup with dm-crypt mini howto 2005-09-05 00:06:17 -07:00
swsusp.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
tricks.txt update email address 2010-07-19 10:56:54 +02:00
userland-swsusp.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
video.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
video_extension.txt [PATCH] acpi: fix video docs 2005-06-25 16:24:32 -07:00