From: Anthony Liguori <anthony@codemonkey.ws>
To: Avi Kivity <avi@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [Qemu-devel] [PATCH] RFC: Add new block driver for the VDI format
Date: Sun, 02 Aug 2009 21:25:46 -0500 [thread overview]
Message-ID: <4A764AAA.1030509@codemonkey.ws> (raw)
In-Reply-To: <4A75A242.9020005@redhat.com>
Avi Kivity wrote:
> On 07/06/2009 04:37 PM, Anthony Liguori wrote:
>>
>> I'd really like to get rid of synchronous IO functions in the block
>> layer. One way to do this is to insist that all new block drivers
>> only implement the AIO functions.
>>
>> I think we should make this decree but I'd like to know if other
>> people think this is unreasonable first. One potential model of
>> block drivers would involve synchronous IO and threads. I'm not a
>> big fan of that model and I don't think it's an easy conversion from
>> today's synchronous IO drivers to that model because the locking and
>> re-entrance needs careful consideration.
>>
>
> I agree that sync+threads is not easy, but well performing async is
> much, much harder. Consider that qcow2 still has synchronous
> operations, and that eliminating the RMW when writing a partial
> cluster concurrently (a very common operation with 64K clusters) is
> very hard to do ayncly and much easier syncly.
Supporting parallel RMW operations is certainly difficult, but you're
confusing parallel RMW ops with asynchronous RMW ops. You just have to
queue requests and handle them in order. It's only mildly more
difficult to deal with asynchronous I/O and it avoids all the nastiness
associated with threads and locking.
Fundamentally, threads don't help the RMW problem because you probably
would just hold a look for the entire RMW operation so you're
effectively queuing any RMW op.
> Given in addition the large numbers of format drivers, I think we
> should prefer sync+threads over trying to convert all format drivers
> to full async.
It's just shifting the problem from one place to another. Instead of
figuring out the state machine, you have to figure out how to do the
locking. The danger of the later is that it gives you the illusion that
it's an easy problem and is therefore prone to error.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-08-03 2:25 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-03 19:24 [Qemu-devel] [PATCH] RFC: Add new block driver for the VDI format Stefan Weil
2009-07-03 19:29 ` [Qemu-devel] [PATCH] Check availability of uuid header / lib Stefan Weil
2009-07-03 19:29 ` [Qemu-devel] [PATCH] Add new block driver for the VDI format Stefan Weil
2009-07-05 8:05 ` Christoph Hellwig
2009-07-05 14:02 ` Stefan Weil
2009-07-06 10:25 ` Christoph Hellwig
2009-07-06 17:19 ` Stefan Weil
2009-07-05 14:44 ` Kevin Wolf
2009-07-06 13:37 ` [Qemu-devel] [PATCH] RFC: " Anthony Liguori
2009-07-06 21:10 ` Stefan Weil
2009-07-06 21:28 ` Anthony Liguori
2009-07-07 7:55 ` Kevin Wolf
2009-07-07 9:04 ` Jamie Lokier
2009-07-07 10:30 ` Christoph Hellwig
2009-07-07 10:33 ` Kevin Wolf
2009-08-02 14:27 ` Avi Kivity
2009-08-03 2:25 ` Anthony Liguori [this message]
2009-08-03 13:02 ` Avi Kivity
2009-08-03 15:20 ` Christoph Hellwig
2009-07-23 15:58 ` [Qemu-devel] [PATCH] RFC: Add new block driver for the VDI format (aio version) Stefan Weil
2009-07-23 20:27 ` [Qemu-devel] [PATCH] Check availability of uuid header / lib Stefan Weil
2009-07-24 6:32 ` Christoph Egger
2009-10-01 18:13 ` Stefan Weil
2009-10-02 8:32 ` Christoph Egger
2009-10-01 18:10 ` [Qemu-devel] [PATCH] Check availability of uuid header / library Stefan Weil
2009-07-23 20:29 ` [Qemu-devel] [PATCH] Add new block driver for the VDI format (use aio) Stefan Weil
2009-07-24 9:18 ` Kevin Wolf
2009-07-24 16:20 ` Stefan Weil
2009-07-27 8:00 ` Kevin Wolf
2009-07-27 9:23 ` Jamie Lokier
2009-07-28 6:37 ` Amit Shah
2009-07-28 8:34 ` Jamie Lokier
2009-07-28 8:56 ` Daniel P. Berrange
2009-07-28 9:03 ` Jamie Lokier
2009-07-28 9:11 ` Kevin Wolf
2009-07-31 15:04 ` Christoph Hellwig
2009-07-31 19:53 ` Stefan Weil
2009-07-31 15:25 ` Anthony Liguori
2009-07-31 18:27 ` Stefan Weil
2009-07-31 19:45 ` [Qemu-devel] [PATCH] Add new block driver for the VDI format (only aio supported) Stefan Weil
2009-07-23 20:30 ` [Qemu-devel] [PATCH] add support for new option of vdi format Stefan Weil
2009-07-23 20:34 ` [Qemu-devel] " Stefan Weil
2009-07-31 14:59 ` [Qemu-devel] " Christoph Hellwig
2009-08-13 16:53 ` Christoph Hellwig
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=4A764AAA.1030509@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=hch@lst.de \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).