qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Alexey Perevalov <a.perevalov@samsung.com>
Cc: qemu-devel@nongnu.org, i.maximets@samsung.com,
	quintela@redhat.com, dgilbert@redhat.com
Subject: Re: [Qemu-devel] [PATCH v6 3/3] migration: add bitmap for received page
Date: Thu, 29 Jun 2017 11:28:02 +0800	[thread overview]
Message-ID: <20170629032802.GD32268@pxdev.xzpeter.org> (raw)
In-Reply-To: <1498654172-26570-4-git-send-email-a.perevalov@samsung.com>

On Wed, Jun 28, 2017 at 08:49:32AM -0400, Alexey Perevalov wrote:

[...]

> @@ -2324,8 +2352,14 @@ static int ram_load_setup(QEMUFile *f, void *opaque)

[1]

>  
>  static int ram_load_cleanup(void *opaque)
>  {
> +    RAMBlock *rb;
>      xbzrle_load_cleanup();
>      compress_threads_load_cleanup();
> +
> +    RAMBLOCK_FOREACH(rb) {
> +        g_free(rb->receivedmap);
> +        rb->receivedmap = NULL;
> +    }
>      return 0;
>  }

Can we put init into ram_load_setup()? (I don't have the codes, but I
see this function above at [1], I suppose it'll be called on dest side
before migration really starts?)

Sorry for my harshness, but this just looks weird. I am not asking
that we _must_ put it somewhere outside RAM codes, but at least I
think they should be paired. If you cleanup the bitmap in RAM code,
why not you init it in RAM code as well? Did I miss anything again?

-- 
Peter Xu

  reply	other threads:[~2017-06-29  3:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170628125217eucas1p1c69600c8c254afe9dfc50c72224de551@eucas1p1.samsung.com>
2017-06-28 12:49 ` [Qemu-devel] [PATCH v6 0/3] Add bitmap for received pages in postcopy migration Alexey Perevalov
     [not found]   ` <CGME20170628125224eucas1p20961fd8d4b71906d84446cd50d59cfb8@eucas1p2.samsung.com>
2017-06-28 12:49     ` [Qemu-devel] [PATCH v6 1/3] migration: postcopy_place_page factoring out Alexey Perevalov
     [not found]   ` <CGME20170628125231eucas1p1bf1ee6e6bb79cf84b82e97cbf26a2dc4@eucas1p1.samsung.com>
2017-06-28 12:49     ` [Qemu-devel] [PATCH v6 2/3] migration: introduce qemu_ufd_copy_ioctl helper Alexey Perevalov
     [not found]   ` <CGME20170628125232eucas1p1af5a7b0d734c7af25a20981e25812ee2@eucas1p1.samsung.com>
2017-06-28 12:49     ` [Qemu-devel] [PATCH v6 3/3] migration: add bitmap for received page Alexey Perevalov
2017-06-29  3:28       ` Peter Xu [this message]
2017-06-29  8:11         ` Alexey

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=20170629032802.GD32268@pxdev.xzpeter.org \
    --to=peterx@redhat.com \
    --cc=a.perevalov@samsung.com \
    --cc=dgilbert@redhat.com \
    --cc=i.maximets@samsung.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).