]> git.baikalelectronics.ru Git - kernel.git/commit
PM / hibernate: Recycle safe pages after image restoration
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 29 Jun 2016 01:05:10 +0000 (03:05 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 1 Jul 2016 23:52:10 +0000 (01:52 +0200)
commit9529c98a73564ba597fff91e5448616703151261
treee57099612a87150b5728612e77ae0330abecdb81
parent1a7a4e6c53ab42def348d9fd3d491166f7889090
PM / hibernate: Recycle safe pages after image restoration

One of the memory bitmaps used by the hibernation image restoration
code is freed after the image has been loaded.

That is not quite efficient, though, because the memory pages used
for building that bitmap are known to be safe (ie. they were not
used by the image kernel before hibernation) and the arch-specific
code finalizing the image restoration may need them.  In that case
it needs to allocate those pages again via the memory management
subsystem, check if they are really safe again by consulting the
other bitmaps and so on.

To avoid that, recycle those pages by putting them into the global
list of known safe pages so that they can be given to the arch code
right away when necessary.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/snapshot.c