qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Pavel Hrdina <phrdina@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Dietmar Maurer <dietmar@proxmox.com>,
	Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image
Date: Thu, 21 Mar 2013 15:56:30 +0100	[thread overview]
Message-ID: <20130321145630.GA16677@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <514B0E3F.5070309@redhat.com>

On Thu, Mar 21, 2013 at 02:42:23PM +0100, Paolo Bonzini wrote:
> Il 21/03/2013 14:38, Stefan Hajnoczi ha scritto:
> > There already is a guest RAM cloning mechanism: fork the QEMU process.
> > Then you have a copy-on-write guest RAM.
> > 
> > In a little more detail:
> > 
> > 1. save non-RAM device state
> > 2. quiesce QEMU to a state that is safe for forking
> > 3. create an EventNotifier for live savevm completion signal
> > 4. fork and pass completion EventNotifier to child
> > 5. parent continues running VM
> > 6. child performs vmsave of copy-on-write guest RAM
> > 7. child signals completion EventNotifier and terminates
> > 8. parent raises live savevm completion QMP event
> 
> Forking a threaded program is not so easy, but it could be done if the
> child is very simple and only uses syscalls to communicate back with the
> parent:

On Linux you should be able to use clone(2) to spawn a thread with
copy-on-write memory.  Too bad it's not portable because it gets around
the messy fork issues.

Stefan

  parent reply	other threads:[~2013-03-21 14:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15  7:24 [Qemu-devel] [RFC] qmp interface for save vmstate to image Wenchao Xia
2013-03-15 14:51 ` Stefan Hajnoczi
2013-03-18  6:40   ` Wenchao Xia
2013-03-18  9:04     ` Kevin Wolf
2013-03-18 10:08       ` Paolo Bonzini
2013-03-18 10:50         ` Wenchao Xia
2013-03-18 10:47       ` Wenchao Xia
2013-03-18 10:09     ` Stefan Hajnoczi
2013-03-18 13:28 ` Pavel Hrdina
2013-03-21  6:43   ` Wenchao Xia
2013-03-21 11:48     ` Pavel Hrdina
2013-03-21 13:38       ` Stefan Hajnoczi
2013-03-21 13:42         ` Paolo Bonzini
2013-03-21 13:53           ` Pavel Hrdina
2013-03-21 14:56           ` Stefan Hajnoczi [this message]
2013-03-21 15:08             ` Eric Blake
2013-03-23  4:36               ` Wenchao Xia
2013-03-27  3:35                 ` Wenchao Xia
2013-03-21 13:43         ` 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=20130321145630.GA16677@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=dietmar@proxmox.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=phrdina@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=xiawenc@linux.vnet.ibm.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).