[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC][PATCH 9/9] block: Use bdrv_co_* instead of synchr
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC][PATCH 9/9] block: Use bdrv_co_* instead of synchronous versions in coroutines |
Date: |
Thu, 21 Jul 2011 16:23:54 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Jul 15, 2011 at 06:47:39PM +0200, Kevin Wolf wrote:
> If we're already in a coroutine, there is no reason to use the synchronous
> version of block layer functions when a coroutine one exists. This makes
> bdrv_read/write/flush use bdrv_co_* when used inside a coroutine.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block.c | 43 +++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 43 insertions(+), 0 deletions(-)
I made similar changes to prototype qcow2 coroutines. They allowed
synchronous code to run unmodified inside a coroutine.
But do we want to keep the synchronous APIs? They tend to be misused
because they allow synchronous implementation of devices (extboot,
onenand, and others).
The only reason to keep these around is for qemu-img and perhaps some
startup code before the VM is running. But I think we could tackle
those cases too simply by running in a coroutine and using a common
event loop (which makes timers and bottom halves work too).
Stefan
- [Qemu-devel] [RFC][PATCH 0/9] Use coroutines in the block layer, Kevin Wolf, 2011/07/15
- [Qemu-devel] [RFC][PATCH 1/9] block: Add bdrv_co_readv/writev, Kevin Wolf, 2011/07/15
- [Qemu-devel] [RFC][PATCH 2/9] block: Emulate AIO functions with bdrv_co_readv/writev, Kevin Wolf, 2011/07/15
- [Qemu-devel] [RFC][PATCH 3/9] block: Add bdrv_co_readv/writev emulation, Kevin Wolf, 2011/07/15
- [Qemu-devel] [RFC][PATCH 4/9] coroutines: Locks, Kevin Wolf, 2011/07/15
- [Qemu-devel] [RFC][PATCH 5/9] qcow2: Use coroutines, Kevin Wolf, 2011/07/15
- [Qemu-devel] [RFC][PATCH 6/9] qcow: Use coroutines, Kevin Wolf, 2011/07/15
- [Qemu-devel] [RFC][PATCH 8/9] coroutines: Use one global bottom half for CoQueue, Kevin Wolf, 2011/07/15
- [Qemu-devel] [RFC][PATCH 7/9] async: Remove AsyncContext, Kevin Wolf, 2011/07/15
- [Qemu-devel] [RFC][PATCH 9/9] block: Use bdrv_co_* instead of synchronous versions in coroutines, Kevin Wolf, 2011/07/15
- Re: [Qemu-devel] [RFC][PATCH 9/9] block: Use bdrv_co_* instead of synchronous versions in coroutines,
Stefan Hajnoczi <=