]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Hibernate: fix the number of pages used for hibernate/thaw buffering
authorBojan Smojver <bojan@rexursive.com>
Tue, 24 Apr 2012 21:53:28 +0000 (23:53 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Tue, 24 Apr 2012 21:53:28 +0000 (23:53 +0200)
commitd841002f933b4479c33918871e09fbcd4f21354b
treedfe76c8ef2b3fc700d9550b85b69e414ef415de6
parent8c94d2d2e9c929ec993085434c51908352e0e98a
PM / Hibernate: fix the number of pages used for hibernate/thaw buffering

Hibernation regression fix, since 3.2.

Calculate the number of required free pages based on non-high memory
pages only, because that is where the buffers will come from.

Commit 168452ef754ee15f17e91d37d8931d4a0bd02b8e introduced a new buffer
page allocation logic during hibernation, in order to improve the
performance. The amount of pages allocated was calculated based on total
amount of pages available, although only non-high memory pages are
usable for this purpose. This caused hibernation code to attempt to over
allocate pages on platforms that have high memory, which led to hangs.

Signed-off-by: Bojan Smojver <bojan@rexursive.com>
Signed-off-by: Rafael J. Wysocki <rjw@suse.de>
kernel/power/swap.c