public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bojan Smojver <bojan@rexursive.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Nigel Cunningham <nigel@tuxonice.net>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: Compress hibernation image with LZO (in-kernel)
Date: Mon, 02 Aug 2010 10:54:13 +1000	[thread overview]
Message-ID: <1280710453.2727.8.camel@shrek.rexursive.com> (raw)
In-Reply-To: <20100802091752.3c9f180d.kamezawa.hiroyu@jp.fujitsu.com>

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


  reply	other threads:[~2010-08-02  0:54 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-30  4:46 [PATCH]: Compress hibernation image with LZO (in-kernel) Bojan Smojver
2010-07-30 10:44 ` Bojan Smojver
2010-07-30 22:05   ` Nigel Cunningham
2010-07-30 22:19     ` Bojan Smojver
2010-07-30 23:22     ` Bojan Smojver
2010-07-30 23:40       ` Nigel Cunningham
2010-07-31  1:03         ` Bojan Smojver
2010-07-31  1:18           ` Nigel Cunningham
2010-07-31  1:33             ` Bojan Smojver
2010-07-31  4:41               ` Bojan Smojver
2010-07-31  5:03                 ` Bojan Smojver
2010-08-02  0:17                 ` KAMEZAWA Hiroyuki
2010-08-02  0:54                   ` Bojan Smojver [this message]
2010-08-02  1:10                     ` KAMEZAWA Hiroyuki
2010-08-02  1:21                       ` Bojan Smojver
2010-08-02  1:27                         ` KAMEZAWA Hiroyuki
2010-08-02  1:43                           ` Bojan Smojver
2010-08-03  1:59                             ` Bojan Smojver
2010-08-03  2:30                               ` Bojan Smojver
2010-08-04  2:42                                 ` Nigel Cunningham
2010-08-04  2:47                                   ` Bojan Smojver
2010-08-04  4:04                                     ` Bojan Smojver
2010-08-04  4:23                                       ` Nigel Cunningham
2010-08-04  5:12                                         ` Bojan Smojver
2010-08-04  5:58                                           ` Bojan Smojver
2010-08-05  1:26                                     ` Bojan Smojver
2010-08-03  6:34                               ` Bojan Smojver
2010-08-04  1:50                               ` Nigel Cunningham
2010-08-04  1:58                                 ` Bojan Smojver
2010-08-04  2:02                                 ` KAMEZAWA Hiroyuki
2010-08-04  2:14                                   ` Bojan Smojver
2010-08-04  2:18                                     ` KAMEZAWA Hiroyuki
2010-08-04  2:37                                       ` Nigel Cunningham
2010-08-04  2:24                                   ` Nigel Cunningham
2010-08-04  2:24                                     ` KAMEZAWA Hiroyuki
2010-08-04  2:38                                       ` Nigel Cunningham
2010-08-05  6:26 ` Pavel Machek
2010-08-05  6:55   ` Bojan Smojver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1280710453.2727.8.camel@shrek.rexursive.com \
    --to=bojan@rexursive.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nigel@tuxonice.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox