[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C58C771.6040505@tuxonice.net>
Date: Wed, 04 Aug 2010 11:50:41 +1000
From: Nigel Cunningham <nigel@...onice.net>
To: Bojan Smojver <bojan@...ursive.com>
CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH]: Compress hibernation image with LZO (in-kernel)
Hi.
Sorry for the delay in replying.
On 03/08/10 11:59, Bojan Smojver wrote:
>> From all this, I only got "In swsusp_free()" printed on resume. So, it
> seems that save_image() does indeed free those vmalloc()-ed buffers and
> they are not saved in the image.
>
> I even put this in hibernate.c:
> ---------------------
> /* Restore control flow magically appears here */
> restore_processor_state();
> if (!in_suspend)
> platform_leave(platform_mode);
>
> printk(KERN_ERR "Resumed, checking swsusp_lzo_buffers.\n");
> if (swsusp_lzo_buffers) {
> printk (KERN_ERR "Setting vmalloc() buffers.\n");
> memset(swsusp_lzo_buffers, 0, 80 * PAGE_SIZE);
> }
> ---------------------
>
> This printed just "Resumed, checking swsusp_lzo_buffers.", meaning it
> was already set to NULL.
>
> Any further comments on this? Nigel, what do you reckon?
I don't see what all the fuss was about. save_image is called after the
snapshot is made (hibernate called hibernation_snapshot to create the
image, then swsusp_write which in turn calls save_image), so there's no
possibility of the memory allocated by it being included in the image or
of a memory leak ocuring as a result.
Regards,
Nigel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists