From: Anthony Liguori <aliguori@us.ibm.com>
To: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [RFC PATCH] qed: add support for Copy-on-Read
Date: Fri, 01 Apr 2011 07:28:34 -0500 [thread overview]
Message-ID: <4D95C4F2.2000006@us.ibm.com> (raw)
In-Reply-To: <20110401094210.GB25832@stefanha-thinkpad.localdomain>
On 04/01/2011 04:42 AM, Stefan Hajnoczi wrote:
> On Wed, Mar 30, 2011 at 08:08:34PM -0500, Anthony Liguori wrote:
>> When creating an image using qemu-img, just pass '-o copy_on_read' and then
>> whenever QED reads from a backing file, it will write the block to the QED
>> file after the read completes ensuring that you only fetch from the backing
>> device once.
>>
>> This is very useful for streaming images over a slow connection.
>>
>> This isn't ready for merge yet as it's not playing nice with synchronize I/O.
> What is the issue here? Streaming had issues with aio contexts and
> synchronous I/O emulation but copy-on-read by itself looks safe to me.
Here's the scenario that fails for me although I'm starting to suspect
block/curl as the real culprit.
qemu-img create -f qed -o copy_on_read -b
http://linux.nssl.noaa.gov/fedora/fedora/linux/releases/14/Fedora/x86_64/iso/Fedora-14-x86_64-DVD.iso
cached_iso.img
qemu -cdrom cache_iso.img -boot d
And I have a patch that does a bunch of synchronous reads of the disk.
>> I think it's fairly easy to do the same thing in qcow2 by just hooking adding
>> some logic after bdrv_aio_write() to call back into qcow2 with a synchronous
>> I/O write in the backing file case. Thoughts on whether that would actually
>> work?
> Why not do the follow-up .bdrv_aio_writev() for qcow2 too? I don't see
> a reason to do it synchronously.
Oh, I assumed with coroutines that that would be the preference in
qcow2. If not, AIO is just as good for me :-)
Regards,
Anthony Liguori
> Stefan
next prev parent reply other threads:[~2011-04-01 12:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 1:08 [Qemu-devel] [RFC PATCH] qed: add support for Copy-on-Read Anthony Liguori
2011-04-01 9:42 ` [Qemu-devel] " Stefan Hajnoczi
2011-04-01 12:28 ` Anthony Liguori [this message]
2011-04-01 11:11 ` [Qemu-devel] " Kevin Wolf
2011-04-01 12:36 ` Anthony Liguori
2011-04-01 12:44 ` Kevin Wolf
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=4D95C4F2.2000006@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=kwolf@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.