qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Orit Wasserman <owasserm@redhat.com>
Cc: peter.maydell@linaro.org, aliguori@us.ibm.com,
	quintela@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org,
	mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, avi@redhat.com,
	pbonzini@redhat.com, lcapitulino@redhat.com, chegu_vinod@hp.com
Subject: Re: [Qemu-devel] [PATCH 02/11] Add migrate-set-capabilities and query-migrate-capabilities
Date: Mon, 06 Aug 2012 10:14:31 -0600	[thread overview]
Message-ID: <501FED67.7070809@redhat.com> (raw)
In-Reply-To: <501FEB19.3030007@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2614 bytes --]

On 08/06/2012 10:04 AM, Orit Wasserman wrote:
> On 08/06/2012 05:26 PM, Eric Blake wrote:
>> On 08/05/2012 03:13 AM, Orit Wasserman wrote:
>>> The management can enable/disable a capability for the next migration by using
>>> migrate-set-apabilities QMP command.
>>
>> s/set-apabilities/set-capabilities/
>>

>> In HMP, are migrate_supported_capabilities and migrate_capabilities
>> redundant?  That is, I think I can use either command to answer both
>> questions "what capabilities exist" and "what is the current state of
>> all capabilities that exist", since _both_ commands output a list of
>> capability names as well as an on/off designator.  If my analysis is
>> right, then we don't need migrate_supported_capabilities.
> No 'info migrate_supported_capabilities' shows the capabilities this version of QEMU can supports.
> and 'info migrate_capabilities' show what are the state of capabilities for the migration, i.e what is enabled.

Let's compare:

patch 1/11:

+void hmp_info_migrate_supported_capabilities(Monitor *mon)
+{
+    MigrationCapabilityStatusList *caps_list, *cap;
+
+    caps_list = qmp_query_migrate_supported_capabilities(NULL);
+    if (!caps_list) {
+        monitor_printf(mon, "No supported migration capabilities found\n");
+        return;
+    }
+
+    for (cap = caps_list; cap; cap = cap->next) {
+        monitor_printf(mon, "%s: %s ",
+                       MigrationCapability_lookup[cap->value->capability],
+                       cap->value->state ? "on" : "off");


patch 2/11:

+void hmp_info_migrate_capabilities(Monitor *mon)
+{
+    MigrationCapabilityStatusList *caps, *cap;
+
+    caps = qmp_query_migrate_capabilities(NULL);
+
+    if (caps) {
+        monitor_printf(mon, "capabilities: ");
+        for (cap = caps; cap; cap = cap->next) {
+            monitor_printf(mon, "%s: %s ",
+
MigrationCapability_lookup[cap->value->capability],
+                           cap->value->state ? "on" : "off");

That is, BOTH commands end up iterating over a list of caps, and output
identical information in the case where caps exist of 'name: state' for
each capability.

They really ARE redundant - both commands are telling me:

capabilities:
xbzrle: on
foobar: off

which I can read to answer both my question of 'what is supported'
(xbzrle and foobar) and 'what is enabled' (xbzrle).  I see no need to
have to commands to tell me the same information, so I'd prefer the
shorter name.

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

  reply	other threads:[~2012-08-06 16:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-05  9:13 [Qemu-devel] [PATCH 00/11] Migration next v10 Orit Wasserman
2012-08-05  9:13 ` [Qemu-devel] [PATCH 01/11] Add migration capabilities Orit Wasserman
2012-08-05  9:13 ` [Qemu-devel] [PATCH 02/11] Add migrate-set-capabilities and query-migrate-capabilities Orit Wasserman
2012-08-06 14:26   ` Eric Blake
2012-08-06 16:04     ` Orit Wasserman
2012-08-06 16:14       ` Eric Blake [this message]
2012-08-06 16:28         ` Orit Wasserman
2012-08-06 16:39           ` Eric Blake
2012-08-06 16:49             ` Orit Wasserman
2012-08-05  9:13 ` [Qemu-devel] [PATCH 03/11] Add XBZRLE documentation Orit Wasserman
2012-08-06 15:41   ` Eric Blake
2012-08-05  9:13 ` [Qemu-devel] [PATCH 04/11] Add cache handling functions Orit Wasserman
2012-08-05  9:13 ` [Qemu-devel] [PATCH 05/11] Add uleb encoding/decoding functions Orit Wasserman
2012-08-05  9:13 ` [Qemu-devel] [PATCH 06/11] Add xbzrle_encode_buffer and xbzrle_decode_buffer functions Orit Wasserman
2012-08-05  9:13 ` [Qemu-devel] [PATCH 07/11] Add XBZRLE to ram_save_block and ram_save_live Orit Wasserman
2012-08-05  9:13 ` [Qemu-devel] [PATCH 08/11] Add migrate_set_cache_size command Orit Wasserman
2012-08-06 15:46   ` Eric Blake
2012-08-05  9:13 ` [Qemu-devel] [PATCH 09/11] Add migration accounting for normal and duplicate pages Orit Wasserman
2012-08-06 15:52   ` Eric Blake
2012-08-05  9:13 ` [Qemu-devel] [PATCH 10/11] Add XBZRLE statistics Orit Wasserman
2012-08-06 15:55   ` Eric Blake
2012-08-05  9:13 ` [Qemu-devel] [PATCH 11/11] Restart optimization on stage3 update version Orit Wasserman
  -- strict thread matches above, loose matches on Subject: below --
2012-08-02 12:44 [Qemu-devel] [PATCH 00/11] Migration next v9 Orit Wasserman
2012-08-02 12:44 ` [Qemu-devel] [PATCH 02/11] Add migrate-set-capabilities and query-migrate-capabilities Orit Wasserman
2012-08-03 17:22   ` Luiz Capitulino
2012-08-01 18:01 [Qemu-devel] [PULL 00/11] Migration next Juan Quintela
2012-08-01 18:01 ` [Qemu-devel] [PATCH 02/11] Add migrate-set-capabilities and query-migrate-capabilities Juan Quintela
2012-07-31 20:05 [Qemu-devel] [PATCH 02/11] Add migrate_set_capabilities " Orit Wasserman
2012-08-01  7:08 ` [Qemu-devel] [PATCH 02/11] Add migrate-set-capabilities " Orit Wasserman

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=501FED67.7070809@redhat.com \
    --to=eblake@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=chegu_vinod@hp.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=owasserm@redhat.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).