From: Orit Wasserman <owasserm@redhat.com>
To: quintela@redhat.com
Cc: peter.maydell@linaro.org, aliguori@us.ibm.com,
stefanha@gmail.com, qemu-devel@nongnu.org,
mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com,
chegu_vinod@hp.com, avi@redhat.com, pbonzini@redhat.com,
eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH v11 2/9] Add migration capabilites
Date: Wed, 06 Jun 2012 04:48:19 +0300 [thread overview]
Message-ID: <4FCEB6E3.4060007@redhat.com> (raw)
In-Reply-To: <871ulz9u5g.fsf@elfo.elfo>
On 06/01/2012 01:57 PM, Juan Quintela wrote:
> Orit Wasserman <owasserm@redhat.com> wrote:
>> Add migration capabiltes that can be queried by the management.
>> The managment can query the source QEMU and the destination QEMU in order to
>> verify both support some migration capability (currently only XBZRLE).
>> The managment can enable a capabilty for the next migration by using
>> migrate_set_parameter command.
>>
>> Signed-off-by: Orit Wasserman <owasserm@redhat.com>
>> +void qmp_migrate_set_parameter(const char *parameter, Error **errp)
>> +{
>> + MigrationState *s = migrate_get_current();
>> + int i;
>> +
>> + if (s->state == MIG_STATE_ACTIVE) {
>> + error_set(errp, QERR_MIGRATION_ACTIVE);
>> + return;
>> + }
>> +
>> + for (i = 0; i < MIGRATION_CAPABILITY_MAX; i++) {
>> + if (strcmp(parameter, MigrationCapability_lookup[i]) == 0) {
>> + s->enabled_capabilities[i] = true;
>> + return;
>> + }
>> + }
>> +
>> + error_set(errp, QERR_INVALID_PARAMETER, parameter);
>> +}
>
> Two things here:
> - Is there a way to disable capabilities? it seems no.
In this implementation we can't disable a capability , do you see a need to add it ?
> - Would we want in the future capabilities that are not "bool"? Just
> asking loud, I haven't thought a lot about this. Fixing it as a
> paramenter, it would make trivial to fix previous comment: cap:true vs
> cap:false, or whatever syntax we want.
That is a good idea I will change it in next patch set.
Orit
>
>> memset(s, 0, sizeof(*s));
>> s->bandwidth_limit = bandwidth_limit;
>> s->params = *params;
>> + memcpy(s->enabled_capabilities, enabled_capabilities,
>> + sizeof(enabled_capabilities));
>>
>> - s->bandwidth_limit = bandwidth_limit;
>> s->state = MIG_STATE_SETUP;
>
> Nice catch/cleanup.
>
>
>> diff --git a/savevm.c b/savevm.c
>> index dd66f2c..42937a0 100644
>> --- a/savevm.c
>> +++ b/savevm.c
>> @@ -1711,7 +1711,7 @@ static int qemu_savevm_state(QEMUFile *f)
>> int ret;
>> MigrationParams params = {
>> .blk = 0,
>> - .shared = 0
>> + .shared = 0,
>> };
>>
>> if (qemu_savevm_state_blocked(NULL)) {
>
> This belongs to previous patch?
>
> Later, Juan.
next prev parent reply other threads:[~2012-06-06 5:26 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 12:56 [Qemu-devel] [PATCH v11 0/9] XBZRLE delta for live migration of large memory app Orit Wasserman
2012-05-22 12:56 ` [Qemu-devel] [PATCH v11 1/9] Add MigrationParams structure Orit Wasserman
2012-06-01 10:51 ` Juan Quintela
2012-05-22 12:56 ` [Qemu-devel] [PATCH v11 2/9] Add migration capabilites Orit Wasserman
2012-05-22 13:08 ` Eric Blake
2012-06-01 10:57 ` Juan Quintela
2012-06-06 1:48 ` Orit Wasserman [this message]
2012-06-07 10:41 ` Juan Quintela
2012-05-22 12:56 ` [Qemu-devel] [PATCH v11 3/9] Add XBZRLE documentation Orit Wasserman
2012-05-22 13:13 ` Eric Blake
2012-06-01 10:58 ` Juan Quintela
2012-05-22 12:57 ` [Qemu-devel] [PATCH v11 4/9] Add cache handling functions Orit Wasserman
2012-06-01 11:01 ` Juan Quintela
2012-05-22 12:57 ` [Qemu-devel] [PATCH v11 5/9] Add uleb encoding/decoding functions Orit Wasserman
2012-06-01 11:04 ` Juan Quintela
2012-05-22 12:57 ` [Qemu-devel] [PATCH v11 6/9] Add save_block_hdr function Orit Wasserman
2012-06-01 11:04 ` Juan Quintela
2012-05-22 12:57 ` [Qemu-devel] [PATCH v11 7/9] Add XBZRLE to ram_save_block and ram_save_live Orit Wasserman
2012-06-01 11:42 ` Juan Quintela
2012-06-06 2:13 ` Orit Wasserman
2012-06-07 10:38 ` Juan Quintela
2012-05-22 12:57 ` [Qemu-devel] [PATCH v11 8/9] Add set_cachesize command Orit Wasserman
2012-06-01 11:19 ` Juan Quintela
2012-06-06 2:14 ` Orit Wasserman
2012-05-22 12:57 ` [Qemu-devel] [PATCH v11 9/9] Add XBZRLE statistics Orit Wasserman
2012-06-01 11:10 ` Juan Quintela
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=4FCEB6E3.4060007@redhat.com \
--to=owasserm@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=chegu_vinod@hp.com \
--cc=eblake@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@gmail.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).