qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Huangpeng (Peter)" <peter.huangpeng@huawei.com>
Cc: "kwolf@redhat.com" <kwolf@redhat.com>,
	Pavel Hrdina <phrdina@redhat.com>,
	Zhanghailiang <zhang.zhanghailiang@huawei.com>,
	KVM devel mailing list <kvm@vger.kernel.org>,
	"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: Tue, 4 Mar 2014 09:54:56 +0100	[thread overview]
Message-ID: <20140304085456.GD25676@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <615092B2FD0E7648B6E4B43E029BCFB84D5794D0@SZXEMA503-MBS.china.huawei.com>

On Tue, Mar 04, 2014 at 01:02:44AM +0000, Huangpeng (Peter) wrote:
> > But back to the options:
> > 
> > If the host has enough free memory to fork QEMU, a small helper process can
> > be used to save the copy-on-write memory snapshot (thanks to fork(2)
> > semantics).  The hard part about the fork(2) approach is that QEMU isn't
> > really designed to fork, so work is necessary to reach a quiescent state for the
> > child process.
> > 
> > If there is not enough memory to fork, then a synchronous approach to
> > catching guest memory writes is needed.  I'm not sure if a good mechanism
> > for that exists but the simplest would be mprotect(2) and a signal handler
> > (which will make the guest run very slowly).
> > 
> > Stefan
> 
> In real production environment, memory over-commit or use as much memory as
> possible may be the normal case, so the fork semantics cannot meet the needs.  

Yes, I think you're right.  The fork approach only works in the easy
case where there is plenty of free host memory.

> Is there any other proposals to implement vm-snapshot?

See the discussion by Paolo and Andrea about post-copy migration, which
adds kernel memory management features for tracking userspace page
faults.  Perhaps you can use that infrastructure to trap guest writes.

Stefan

  reply	other threads:[~2014-03-04  8: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
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 [this message]
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=20140304085456.GD25676@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=phrdina@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --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).