linux-kernel-test/kernel/power
Rafael J. Wysocki ddeb648708 PM / Hibernate: Add sysfs knob to control size of memory for drivers
Martin reports that on his system hibernation occasionally fails due
to the lack of memory, because the radeon driver apparently allocates
too much of it during the device freeze stage.  It turns out that the
amount of memory allocated by radeon during hibernation (and
presumably during system suspend too) depends on the utilization of
the GPU (e.g. hibernating while there are two KDE 4 sessions with
compositing enabled causes radeon to allocate more memory than for
one KDE 4 session).

In principle it should be possible to use image_size to make the
memory preallocation mechanism free enough memory for the radeon
driver, but in practice it is not easy to guess the right value
because of the way the preallocation code uses image_size.  For this
reason, it seems reasonable to allow users to control the amount of
memory reserved for driver allocations made after the hibernate
preallocation, which currently is constant and amounts to 1 MB.

Introduce a new sysfs file, /sys/power/reserved_size, whose value
will be used as the amount of memory to reserve for the
post-preallocation reservations made by device drivers, in bytes.
For backwards compatibility, set its default (and initial) value to
the currently used number (1 MB).

References: https://bugzilla.kernel.org/show_bug.cgi?id=34102
Reported-and-tested-by: Martin Steigerwald <Martin@Lichtvoll.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-05-17 23:19:19 +02:00
..
block_io.c block: kill off REQ_UNPLUG 2011-03-10 08:52:27 +01:00
console.c vt: introduce and use vt_kmsg_redirect() function 2009-12-15 08:53:28 -08:00
hibernate.c PM / Hibernate: Add sysfs knob to control size of memory for drivers 2011-05-17 23:19:19 +02:00
Kconfig fix XEN_SAVE_RESTORE Kconfig dependencies 2011-04-11 22:54:48 +02:00
main.c PM / Hibernate: Add sysfs knob to control size of memory for drivers 2011-05-17 23:19:19 +02:00
Makefile kernel: change to new flag variable 2011-03-17 14:02:54 +01:00
power.h PM / Hibernate: Add sysfs knob to control size of memory for drivers 2011-05-17 23:19:19 +02:00
poweroff.c Input: sysrq - drop tty argument from sysrq ops handlers 2010-08-19 22:07:06 -07:00
process.c workqueue, freezer: unify spelling of 'freeze' + 'able' to 'freezable' 2011-02-16 17:48:59 +01:00
snapshot.c PM / Hibernate: Add sysfs knob to control size of memory for drivers 2011-05-17 23:19:19 +02:00
suspend_test.c PM: Make warning in suspend_test_finish() less likely to happen 2009-10-22 08:23:45 +09:00
suspend.c PM / Suspend: Do not ignore error codes returned by suspend_enter() 2011-05-17 23:19:16 +02:00
swap.c Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block 2011-01-13 10:45:01 -08:00
user.c PM / Hibernate: Fix ioctl SNAPSHOT_S2RAM 2011-05-11 21:10:58 +02:00