qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Eric Blake <eblake@redhat.com>
Cc: Pavel Hrdina <phrdina@redhat.com>,
	qemu-devel@nongnu.org, phrdina@redhat.c0m,
	lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH 07/13] qapi: Convert savevm
Date: Thu, 10 Jan 2013 13:50:10 +0800	[thread overview]
Message-ID: <50EE5692.20604@linux.vnet.ibm.com> (raw)
In-Reply-To: <50EDEFFC.9090508@redhat.com>

于 2013-1-10 6:32, Eric Blake 写道:
> On 01/09/2013 08:18 AM, Pavel Hrdina wrote:
>> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
>> ---
>>   hmp-commands.hx         |  4 ++--
>>   hmp.c                   |  9 +++++++++
>>   hmp.h                   |  1 +
>>   include/sysemu/sysemu.h |  1 -
>>   qapi-schema.json        | 18 ++++++++++++++++++
>>   qmp-commands.hx         | 29 +++++++++++++++++++++++++++++
>>   savevm.c                | 27 ++++++++++++---------------
>>   7 files changed, 71 insertions(+), 18 deletions(-)
>>
>
> For patches 1-6, you may add Reviewed-by: Eric Blake <eblake@redhat.com>
> However, for this patch, I think we may need to think more about the design.
>
>> +++ b/qapi-schema.json
>> @@ -3017,3 +3017,21 @@
>>   # Since: 1.3.0
>>   ##
>>   { 'command': 'nbd-server-stop' }
>> +
>> +##
>> +# @vm-snapshot-save:
>> +#
>> +# Create a snapshot of the whole virtual machine. If tag is provided as @name,
>> +# it is used as human readable identifier. If there is already a snapshot
>> +# with the same tag or ID, it is replaced.
>> +#
>> +# The VM is automatically stopped and resumed and saving a snapshot can take
>> +# a long time.
>
> Since my initial review on your earlier RFC, I have changed my mind a
> bit and started thinking that merely exposing the existing HMP commands
> as raw QMP commands is gross.  The HMP design is blocking - you can't
> abort the snapshot, and since it is long-running, you can't do anything
> else with the guest during that time, either.  Of course, the guest is
> paused, but why does it have to be?  Couldn't we enhance the snapshot
> code to use the same principles as live migration to take an internal
> snapshot without pausing the guest up front?
>
> This our chance to make life better by breaking the QMP interface into a
> sequence of commands, and merely rewriting the existing HMP command call
> the entire QMP sequence under the hood, rather than just exposing the
> same clunky one-command design in QMP.  In other words, I think it would
> be nicer to have a job-based snapshot, where one command starts the
> snapshot, and then another command can query status to see if the
> snapshot is still underway, an event gets fired when the snapshot
> completes, and where yet another command can be used to cleanly abort a
> long-running snapshot if it turns out the snapshot is no longer needed
> because something else came up that must be dealt with now.
>
> In other words, I think this series and Wenchao Xia's series[1] need to
> coordinate on a common design.
> [1] https://lists.gnu.org/archive/html/qemu-devel/2013-01/msg00645.html
>
   I think the job based snapshot may comes later after vmstate live save
is implemented, and now this interface is acceptable but mark it in
name or comment that it is sync.

>> +#
>> +# @name: #optional tag of new snapshot or tag|id of existing snapshot
>> +#
>> +# Returns: Nothing on success
>> +#
>> +# Since: 1.4.0
>> +##
>> +{ 'command': 'vm-snapshot-save', 'data': {'*name': 'str'} }
>
> But if we insist making the same clunky QMP interface, then this (plus
> the followup improvements in 13/13 for adding a force option) seems like
> a valid translation from HMP.
>


-- 
Best Regards

Wenchao Xia

  reply	other threads:[~2013-01-10  5:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-09 15:17 [Qemu-devel] [PATCH 00/13] convert savevm to use qapi and introduce qmp command Pavel Hrdina
2013-01-09 15:17 ` [Qemu-devel] [PATCH 01/13] block: add error parameter to bdrv_snapshot_create() and related functions Pavel Hrdina
2013-01-09 15:17 ` [Qemu-devel] [PATCH 02/13] block: add error parameter to del_existing_snapshots() Pavel Hrdina
2013-01-09 15:17 ` [Qemu-devel] [PATCH 03/13] savevm: add error parameter to qemu_savevm_state_begin() Pavel Hrdina
2013-01-09 15:17 ` [Qemu-devel] [PATCH 04/13] savevm: add error parameter to qemu_savevm_state_iterate() Pavel Hrdina
2013-01-09 15:17 ` [Qemu-devel] [PATCH 05/13] savevm: add error parameter to qemu_savevm_state_complete() Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 06/13] savevm: add error parameter to qemu_savevm_state() Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 07/13] qapi: Convert savevm Pavel Hrdina
2013-01-09 22:32   ` Eric Blake
2013-01-10  5:50     ` Wenchao Xia [this message]
2013-01-09 15:18 ` [Qemu-devel] [PATCH 08/13] qemu-img: introduce qemu_img_handle_error Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 09/13] block: update return value from bdrv_snapshot_create Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 10/13] savevm: update return value from qemu_savevm_state_begin Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 11/13] savevm: update return value from qemu_savevm_state_complete Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 12/13] savevm: update return value from qemu_savevm_state Pavel Hrdina
2013-01-09 22:39   ` Eric Blake
2013-01-10 10:35     ` Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 13/13] vm-snapshot-save: add force parameter Pavel Hrdina
2013-01-09 22:47   ` Eric Blake
2013-01-10 11:54     ` Pavel Hrdina
2013-01-09 15:34 ` [Qemu-devel] [PATCH 00/13] convert savevm to use qapi and introduce qmp command Pavel Hrdina

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=50EE5692.20604@linux.vnet.ibm.com \
    --to=xiawenc@linux.vnet.ibm.com \
    --cc=eblake@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=phrdina@redhat.c0m \
    --cc=phrdina@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).