Messages in this thread |  | | Subject | Re: [PATCH]: Compress hibernation image with LZO (in-kernel) | | From | Bojan Smojver <> | | Date | Mon, 02 Aug 2010 10:54:13 +1000 |
| |
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) flags |= SF_PLATFORM_MODE; 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 less.
-- Bojan
|  |