All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 0/5] block: do request processing in a coroutine
Date: Thu, 13 Oct 2011 15:05:10 +0200	[thread overview]
Message-ID: <4E96E206.6060800@redhat.com> (raw)
In-Reply-To: <1318507705-13840-1-git-send-email-stefanha@linux.vnet.ibm.com>

Am 13.10.2011 14:08, schrieb Stefan Hajnoczi:
> Note: this version applies against Kevin's block tree
> 
> Block layer features like dirty block tracing, I/O throttling, and live block
> copy are forced to duplicate code due to the three different interfaces:
> synchronous, asynchronous, and coroutines.
> 
> Since there are bdrv_read(), bdrv_aio_readv(), and bdrv_co_readv() interfaces
> for read (and similar for write), per-request processing needs to be duplicated
> for each of these execution contexts.  For example, dirty block tracking code
> is duplicated across these three interfaces.
> 
> This patch series unifies request processing so that there is only one code
> path.  I see this as a prerequisite to the live block copy (image streaming)
> code I am working on, so I'm pushing it now.
> 
> The short-term win from this series is that it becomes easy to add live block
> copy and other features.  We now have a single code path where the perf-request
> processing is done.
> 
> The longer-term win will be dropping the BlockDriver .bdrv_read(),
> .bdrv_write(), .bdrv_aio_readv(), and .bdrv_aio_writev() interfaces.  By doing
> that we can bring all BlockDrivers onto a common interface, namely
> .bdrv_co_readv() and .bdrv_co_writev().  It will also allow us to drop most of
> the sync and aio emulation code.
> 
> A consequence of this patch series is that every I/O request goes through at
> least one coroutine.  There is no longer a direct .bdrv_read(), .bdrv_write(),
> .bdrv_aio_readv(), or .bdrv_aio_writev() call - we're trying to phase out those
> interfaces.  I have not noticed performance degradation in correctness tests
> but we need to confirm that there has not been a performance regression.
> 
> v2:
>  * Fixed bdrv_read()/bdrv_write() infinite loop [Kevin]
> 
> Stefan Hajnoczi (5):
>   block: directly invoke .bdrv_* from emulation functions
>   block: switch bdrv_read()/bdrv_write() to coroutines
>   block: switch bdrv_aio_readv() to coroutines
>   block: mark blocks dirty on coroutine write completion
>   block: switch bdrv_aio_writev() to coroutines
> 
>  block.c |  245 ++++++++++++++++++++++++++++----------------------------------
>  1 files changed, 111 insertions(+), 134 deletions(-)

Thanks, applied to the block branch.

I think there's some dead code now, but we can leave the clean-up for later.

Kevin

      parent reply	other threads:[~2011-10-13 13:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 12:08 [Qemu-devel] [PATCH v2 0/5] block: do request processing in a coroutine Stefan Hajnoczi
2011-10-13 12:08 ` [Qemu-devel] [PATCH v2 1/5] block: directly invoke .bdrv_* from emulation functions Stefan Hajnoczi
2011-10-13 12:08 ` [Qemu-devel] [PATCH v2 2/5] block: switch bdrv_read()/bdrv_write() to coroutines Stefan Hajnoczi
2011-10-13 12:08 ` [Qemu-devel] [PATCH v2 3/5] block: switch bdrv_aio_readv() " Stefan Hajnoczi
2011-10-13 12:08 ` [Qemu-devel] [PATCH v2 4/5] block: mark blocks dirty on coroutine write completion Stefan Hajnoczi
2011-10-13 12:08 ` [Qemu-devel] [PATCH v2 5/5] block: switch bdrv_aio_writev() to coroutines Stefan Hajnoczi
2011-10-13 13:05 ` Kevin Wolf [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=4E96E206.6060800@redhat.com \
    --to=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.