[lkml]   [2010]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH]: Compress hibernation image with LZO (in-kernel)
On Mon, 2010-08-02 at 09:17 +0900, KAMEZAWA Hiroyuki wrote:
> Now, vmallc() is used here. Then, following will happen.
> 1. vmalloc()
> -> vmalloc adds vmap objects and set page table entries.
> 2. saving image
> -> At taking snapshot of memory to the disk, above vmalloc() area
> is
> saved to disk as it is.
> ...
> 3. At restore
> Because you dont't remember which vmalloc() area was used for
> creating
> snapshot, you can't free it at swsusp_free().
> memory leak ?

To be honest, I'm not sure.

However, I thought that by the time save_image() is called, snapshot has
already been taken, no?
error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM);
if (error)
goto Thaw;

if (in_suspend) {
unsigned int flags = 0;

if (hibernation_mode == HIBERNATION_PLATFORM)
pr_debug("PM: writing image.\n");
error = swsusp_write(flags); <--- this calls save_image()

So, me thinks that these allocations will not be in the snapshot image.

PS. Take everything I take with a grain (or two) of salt. I'm just a
regular Linux user trying to make my Fedora hibernate/thaw process suck


 \ /
  Last update: 2010-08-02 02:57    [W:0.075 / U:0.020 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site