From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <aliguori@linux.vnet.ibm.com>
Cc: "libvir-list@redhat.com" <libvir-list@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] QEMU interfaces for image streaming and post-copy block migration
Date: Sun, 12 Sep 2010 12:55:44 +0200 [thread overview]
Message-ID: <4C8CB1B0.9070203@redhat.com> (raw)
In-Reply-To: <4C864118.7070206@linux.vnet.ibm.com>
On 09/07/2010 04:41 PM, Anthony Liguori wrote:
> Hi,
>
> We've got copy-on-read and image streaming working in QED and before
> going much further, I wanted to bounce some interfaces off of the
> libvirt folks to make sure our final interface makes sense.
>
> Here's the basic idea:
>
> Today, you can create images based on base images that are copy on
> write. With QED, we also support copy on read which forces a copy
> from the backing image on read requests and write requests.
Is copy on read QED specific? It looks very similar to the commit
command, except with I/O directions reversed.
IIRC, commit looks like
for each sector:
if image.mapped(sector):
backing_image.write(sector, image.read(sector))
whereas copy-on-read looks like:
def copy_on_read():
set_ioprio(idle)
for each sector:
if not image.mapped(sector):
image.write(sector, backing_image.read(sector))
run_in_thread(copy_on_read)
With appropriate locking.
>
> In additional to copy on read, we introduce a notion of streaming a
> block device which means that we search for an unallocated region of
> the leaf image and force a copy-on-read operation.
>
> The combination of copy-on-read and streaming means that you can start
> a guest based on slow storage (like over the network) and bring in
> blocks on demand while also having a deterministic mechanism to
> complete the transfer.
>
> The interface for copy-on-read is just an option within qemu-img
> create. Streaming, on the other hand, requires a bit more thought.
> Today, I have a monitor command that does the following:
>
> stream <device> <sector offset>
>
> Which will try to stream the minimal amount of data for a single I/O
> operation and then return how many sectors were successfully streamed.
>
> The idea about how to drive this interface is a loop like:
>
> offset = 0;
> while offset < image_size:
> wait_for_idle_time()
> count = stream(device, offset)
> offset += count
>
This is way too low level for the management stack.
Have you considered using the idle class I/O priority to implement
this? That would allow host-wide prioritization. Not sure how to do
cluster-wide, I don't think NFS has the concept of I/O priority.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2010-09-12 10:55 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 13:41 [Qemu-devel] QEMU interfaces for image streaming and post-copy block migration Anthony Liguori
2010-09-07 14:01 ` Alexander Graf
2010-09-07 14:31 ` Anthony Liguori
2010-09-07 14:33 ` Stefan Hajnoczi
2010-09-07 14:51 ` Anthony Liguori
2010-09-07 14:55 ` Stefan Hajnoczi
2010-09-07 15:00 ` Anthony Liguori
2010-09-07 15:09 ` Stefan Hajnoczi
2010-09-07 15:20 ` Anthony Liguori
2010-09-08 8:26 ` Kevin Wolf
2010-09-07 14:34 ` Kevin Wolf
2010-09-07 14:49 ` Stefan Hajnoczi
2010-09-07 14:57 ` Anthony Liguori
2010-09-07 15:05 ` Stefan Hajnoczi
2010-09-07 15:23 ` Anthony Liguori
2010-09-12 12:41 ` Avi Kivity
2010-09-12 13:25 ` Anthony Liguori
2010-09-12 13:40 ` Avi Kivity
2010-09-12 15:23 ` Anthony Liguori
2010-09-12 16:45 ` Avi Kivity
2010-09-12 17:19 ` Anthony Liguori
2010-09-12 17:31 ` Avi Kivity
2010-09-07 14:49 ` Anthony Liguori
2010-09-07 15:02 ` Kevin Wolf
2010-09-07 15:11 ` Anthony Liguori
2010-09-07 15:20 ` Kevin Wolf
2010-09-07 15:30 ` Anthony Liguori
2010-09-07 15:39 ` Kevin Wolf
2010-09-07 16:00 ` Anthony Liguori
2010-09-07 15:03 ` [Qemu-devel] " Daniel P. Berrange
2010-09-07 15:16 ` Anthony Liguori
2010-09-12 10:55 ` Avi Kivity [this message]
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=4C8CB1B0.9070203@redhat.com \
--to=avi@redhat.com \
--cc=aliguori@linux.vnet.ibm.com \
--cc=libvir-list@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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).