]> git.baikalelectronics.ru Git - kernel.git/commit
PM / hibernate: Do not free preallocated safe pages during image restore
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 29 Jun 2016 01:00:51 +0000 (03:00 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 1 Jul 2016 23:52:09 +0000 (01:52 +0200)
commitaf77a7693a41c695d4491b8633aaa61eab236a10
treefee5b5bf27c2e4eded3a34486a7de4651af4ff92
parent5cf6a5e2c8667ffc532e8c89a15982f77fa2ef2e
PM / hibernate: Do not free preallocated safe pages during image restore

The core image restoration code preallocates some safe pages
(ie. pages that weren't used by the image kernel before hibernation)
for future use before allocating the bulk of memory for loading the
image data.  Those safe pages are then freed so they can be allocated
again (with the memory management subsystem's help).  That's done to
ensure that there will be enough safe pages for temporary data
structures needed during image restoration.

However, it is not really necessary to free those pages after they
have been allocated.  They can be added to the (global) list of
safe pages right away and then picked up from there when needed
without freeing.

That reduces the overhead related to using safe pages, especially
in the arch-specific code, so modify the code accordingly.

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