From: Stefan Hajnoczi <stefanha@gmail.com>
To: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Juan Quintela <quintela@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Dietmar Maurer <dietmar@proxmox.com>
Subject: Re: [Qemu-devel] [RFC] qmp interface for save vmstate to image
Date: Mon, 18 Mar 2013 11:09:10 +0100 [thread overview]
Message-ID: <20130318100910.GB11058@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <5146B6F2.3030004@linux.vnet.ibm.com>
On Mon, Mar 18, 2013 at 02:40:50PM +0800, Wenchao Xia wrote:
> 于 2013-3-15 22:51, Stefan Hajnoczi 写道:
> > On Fri, Mar 15, 2013 at 03:24:38PM +0800, Wenchao Xia wrote:
> >> I'd like to add a new way to save vmstate, which will based on the
> >> migration thread, but will write contents to block images, instead
> >> of fd as stream. Following is the method to add API:
> >
> > Hi Wenchao,
> > What use cases are there besides saving vmstate to a raw image?
> >
> > I'm curious if you're proposing this since there is no "file:" URI or
> > because you really want to do things like saving vmstate into a qcow2
> > file or over NBD.
> >
> > Stefan
> >
> Hi, Stefan
> Most used cases would be "raw" and "qcow2", which is flex and can be
> chosen by user. In this way, existing block layer feature in qemu can
> be used, such as tagging zeros. I haven't check the buffer/cache status
> in qemu block layer, but if there is, it can also benefit.
Okay, thanks for explaining.
You can use caching with the BDRV_O_CACHE_WB option. Then you need to
call bdrv_co_flush() to ensure data reaches the disk. The advantage of
caching is that I/O patterns with many small unaligned writes may be
much faster when going through the host's page cache - and reads can
also be faster.
You can bypass the host page cache with BDRV_O_CACHE_WB | BDRV_NO_CACHE.
Here bdrv_co_flush() calls are still necessary to ensure data reaches
the disk.
Stefan
next prev parent reply other threads:[~2013-03-18 10:09 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 [this message]
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
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=20130318100910.GB11058@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=dietmar@proxmox.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@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).