qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: devin122@gmail.com, Jes Sorensen <Jes.Sorensen@redhat.com>,
	Jagane Sundar <jagane@sundar.org>, Dor Laor <dlaor@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>,
	Feiran Zheng <famcool@gmail.com>,
	Frediano Ziglio <freddy77@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [Qemu-devel] Block layer roadmap
Date: Thu, 28 Jul 2011 13:54:03 +0100	[thread overview]
Message-ID: <CAJSP0QU6mR3Jerd4TdD+L+oTMNyWRoD0ZctPn4jpqcuS4npgOw@mail.gmail.com> (raw)
In-Reply-To: <4E31578E.2080704@redhat.com>

On Thu, Jul 28, 2011 at 1:35 PM, Kevin Wolf <kwolf@redhat.com> wrote:
> Am 28.07.2011 14:09, schrieb Christoph Hellwig:
>> On Wed, Jul 27, 2011 at 01:37:31PM +0100, Stefan Hajnoczi wrote:
>>> Coroutines in the block layer [Kevin]
>>>  * Programming model to simplify block drivers without blocking QEMU threads
>>
>> Can anyone explain what the whole point of this is?  It really just is
>> a bit of syntactic sugar for the current async state machines.  What does
>> it buy us over going for real threading?
>
> The only current block driver that really does everything in an async
> state machine is qed. It's definitely not nice code, and having to
> convert all of the other block drivers to this would be a lot of work.

Thanks Kevin :).  I do agree with the clumsiness of async callback
programming - a lot of code is spent bundling and unbundling variables
to pass between functions, not to mention that the control flow is
much harder to follow.

> So if it only means that we're making things async that would block the
> VCPU until now, isn't that a great improvement already?
>
> The advantage compared to threading is that it allows an easy and
> incremental transition.

Also remember that we already have a threads-based implementation of
coroutines.  Later on we can do fine-grained locking and switch to
threads directly instead of coroutines, if need be.

Stefan

  reply	other threads:[~2011-07-28 12:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27 12:37 [Qemu-devel] Block layer roadmap Stefan Hajnoczi
2011-07-27 12:50 ` Anthony Liguori
2011-07-28 10:05 ` Kevin Wolf
2011-07-28 12:08   ` Christoph Hellwig
2011-07-28 12:29     ` Kevin Wolf
2011-07-28 10:52 ` Stefan Hajnoczi
2011-07-28 12:09 ` Christoph Hellwig
2011-07-28 12:15   ` Frediano Ziglio
2011-07-28 12:16     ` Christoph Hellwig
2011-07-28 12:35   ` Kevin Wolf
2011-07-28 12:54     ` Stefan Hajnoczi [this message]
2011-07-28 13:10       ` Kevin Wolf
2011-07-28 13:11         ` Stefan Hajnoczi
2011-07-28 12:52   ` Anthony Liguori
2011-07-29 12:35 ` Stefan Hajnoczi

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=CAJSP0QU6mR3Jerd4TdD+L+oTMNyWRoD0ZctPn4jpqcuS4npgOw@mail.gmail.com \
    --to=stefanha@gmail.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=armbru@redhat.com \
    --cc=devin122@gmail.com \
    --cc=dlaor@redhat.com \
    --cc=famcool@gmail.com \
    --cc=freddy77@gmail.com \
    --cc=hch@lst.de \
    --cc=jagane@sundar.org \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@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).