From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Pavel Hrdina <phrdina@redhat.com>,
Zhanghailiang <zhang.zhanghailiang@huawei.com>,
KVM devel mailing list <kvm@vger.kernel.org>,
"Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [RFC]VM live snapshot proposal
Date: Mon, 3 Mar 2014 13:55:20 +0100 [thread overview]
Message-ID: <20140303125520.GF4850@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <20140303123234.GC21055@stefanha-thinkpad.redhat.com>
Am 03.03.2014 um 13:32 hat Stefan Hajnoczi geschrieben:
> On Mon, Mar 03, 2014 at 01:13:41AM +0000, Huangpeng (Peter) wrote:
>
> Just to summarize the idea of live savevm for people joining the
> discussion:
>
> It should be possible to save a snapshot of the guest (including memory,
> devices, and disk) without noticable downtime.
>
> The 'savevm' command pauses the guest until the snapshot has been
> completed and therefore doesn't meet the requirements.
>
> > Here I have another proposal, based on the live-migration scheme, add consistent
> > memory state tracking and saving.
> > The idea is simple:
> > 1.First round use live-migration to save all memory to a snapshot file.
> > 2.intercept the action of memory-modify, save old pages to a temporary file and mark dirty-bits,
> > 3.Merge temporary file to the original snapshot file
Why do you need a temporary file for this? Couldn't you directly store
the memory to its final destination in the snapshot file?
> > Detailed process:
> > (1)Pause VM
> > (2) Save the device status to a temporary file (live-migration already supported )
> > (3) Make disk snapshot
> > (4) Enable page dirty log and old dirty pages save function(which we need to add)
> > (5) Resume VM
> > (6) Begin the first round of iteration, we save the entire contents of the VM memory pages
> > to the snapshot file
> > (7) In the second round of iteration , we save the old page to the snapshot file
> > (8) Merge data of device status which is pre-saved in temporary files to the snapshot file
> > (8) End ram snapshot and some cleanup work
> >
> > Due to memory-modifications may happen in kvm, qemu, or vhost, the key-part is how we
> > can provide common page-modify-tracking-and-saving api, we completed a prototype by
> > simply add modified-page tracking/saving function in qemu, and it seems worked fine.
>
> Yes, this is the tricky part. To be honest, I think this is the reason
> no one has submitted patches - it's a hard task and the win isn't that
> great (you can already migrate to file).
So why don't we simply reuse the existing migration code?
Kevin
next prev parent reply other threads:[~2014-03-03 12:55 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-03 1:13 [Qemu-devel] [RFC]VM live snapshot proposal Huangpeng (Peter)
2014-03-03 12:32 ` Stefan Hajnoczi
2014-03-03 12:55 ` Kevin Wolf [this message]
2014-03-03 13:19 ` Paolo Bonzini
2014-03-03 13:30 ` Kevin Wolf
2014-03-03 13:47 ` Paolo Bonzini
2014-03-03 14:04 ` Kevin Wolf
2014-03-03 14:55 ` Dr. David Alan Gilbert
2014-03-03 19:52 ` Andrea Arcangeli
2014-03-04 1:35 ` Huangpeng (Peter)
2014-03-05 14:46 ` Andrea Arcangeli
2014-03-05 1:52 ` Huangpeng (Peter)
2014-03-05 14:55 ` Andrea Arcangeli
2014-03-04 1:28 ` Huangpeng (Peter)
2014-03-04 9:40 ` Dr. David Alan Gilbert
2014-03-05 1:00 ` Huangpeng (Peter)
2014-03-05 9:09 ` Paolo Bonzini
2014-03-06 1:42 ` Huangpeng (Peter)
2014-03-06 9:14 ` Dr. David Alan Gilbert
2014-03-04 1:06 ` Huangpeng (Peter)
2014-03-03 13:18 ` Paolo Bonzini
2014-03-04 1:02 ` Huangpeng (Peter)
2014-03-04 8:54 ` Stefan Hajnoczi
2014-03-04 9:05 ` Paolo Bonzini
2014-03-04 11:28 ` Wenchao Xia
2014-03-05 0:46 ` Huangpeng (Peter)
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=20140303125520.GF4850@dhcp-200-207.str.redhat.com \
--to=kwolf@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=phrdina@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=xiawenc@linux.vnet.ibm.com \
--cc=zhang.zhanghailiang@huawei.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).