From: Juan Quintela <quintela@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, dgilbert@redhat.com, lvivier@redhat.com
Subject: Re: [Qemu-devel] [PATCH 5/5] ram: Make RAMState dynamic
Date: Tue, 06 Jun 2017 19:39:41 +0200 [thread overview]
Message-ID: <87efux582q.fsf@secure.mitica> (raw)
In-Reply-To: <20170606081634.GE27621@pxdev.xzpeter.org> (Peter Xu's message of "Tue, 6 Jun 2017 16:16:34 +0800")
Peter Xu <peterx@redhat.com> wrote:
> On Fri, Jun 02, 2017 at 12:08:13AM +0200, Juan Quintela wrote:
>> We create the variable while we are at migration and we remove it
>> after migration.
>>
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> @@ -1818,6 +1825,8 @@ static int ram_state_init(RAMState *rs)
>> error_report("Error allocating current_buf");
>> g_free(XBZRLE.encoded_buf);
>> XBZRLE.encoded_buf = NULL;
>> + g_free(*rsp);
>> + *rsp = NULL;
>
> Though may not be directly related to this patch, but... do we need to
> destroy the two mutexes as well?
>
> (*rsp)->bitmap_mutex
> (*rsp)->src_page_req_mutex
>
I guess so. Will do on a next series.
> Also a nit: These several places I would slightly prefer a "goto
> xbzrle_fail", then:
>
> xbzrle_fail:
> if (XBZRLE.encoded_buf) {
> g_free(XBZRLE.encoded_buf);
> XBZRLE.encoded_buf = NULL;
> }
> qemu_mutex_destroy(&(*rsp)->bitmap_mutex);
> qemu_mutex_destroy(&(*rsp)->src_page_req_mutex);
> g_free(*rsp);
> *rsp = NULL;
> return -1;
>
My idea is to split the XBZRLE bits from being all overal the code. But
that would be later O:-)
Later, Juan.
prev parent reply other threads:[~2017-06-06 17:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 22:08 [Qemu-devel] [PATCH 0/5] Make RAMState dynamic Juan Quintela
2017-06-01 22:08 ` [Qemu-devel] [PATCH 1/5] ram: Call migration_page_queue_free() at ram_migration_cleanup() Juan Quintela
2017-06-05 11:24 ` Dr. David Alan Gilbert
2017-06-06 7:58 ` Peter Xu
2017-06-01 22:08 ` [Qemu-devel] [PATCH 2/5] ram: Move ZERO_TARGET_PAGE inside XBZRLE Juan Quintela
2017-06-05 11:27 ` Dr. David Alan Gilbert
2017-06-06 7:59 ` Peter Xu
2017-06-01 22:08 ` [Qemu-devel] [PATCH 3/5] migration: Print statistics about the number of remaining target pages Juan Quintela
2017-06-02 15:15 ` Eric Blake
2017-06-02 16:36 ` Juan Quintela
2017-06-06 17:48 ` Juan Quintela
2017-06-01 22:08 ` [Qemu-devel] [PATCH 4/5] ram: Use MigrationStats for statistics Juan Quintela
2017-06-05 12:34 ` Dr. David Alan Gilbert
2017-06-06 8:05 ` Peter Xu
2017-06-06 17:33 ` Juan Quintela
2017-06-07 3:08 ` Peter Xu
2017-06-01 22:08 ` [Qemu-devel] [PATCH 5/5] ram: Make RAMState dynamic Juan Quintela
2017-06-05 15:00 ` Dr. David Alan Gilbert
2017-06-06 8:16 ` Peter Xu
2017-06-06 17:39 ` Juan Quintela [this message]
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=87efux582q.fsf@secure.mitica \
--to=quintela@redhat.com \
--cc=dgilbert@redhat.com \
--cc=lvivier@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).