[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] HLFS driver for QEMU
From: |
harryxiyou |
Subject: |
Re: [Qemu-devel] [PATCH] HLFS driver for QEMU |
Date: |
Thu, 28 Mar 2013 15:36:23 +0800 |
On Mon, Mar 18, 2013 at 7:10 PM, Stefan Hajnoczi <address@hidden> wrote:
[...]
> read/write/flush should be either .bdrv_co_* or .bdrv_aio_*.
>
> The current code pauses the guest while I/O is in progress! Try running
> disk I/O benchmarks inside the guest and you'll see that performance and
> interactivity are poor.
>
> QEMU has two ways of implementing efficient block drivers:
>
> 1. Coroutines - .bdrv_co_*
>
> Good for image formats or block drivers that have internal logic.
>
> Each request runs inside a coroutine - see include/block/coroutine.h.
> In order to wait for I/O, submit an asynchronous request or worker
> thread and yield the coroutine. When the request completes, re-enter
> the coroutine and continue.
>
> Examples: block/sheepdog.c or block/qcow2.c.
>
> 2. Asynchronous I/O - .bdrv_aio_*
>
> Good for low-level block drivers that have little logic.
>
> The request processing code is split into callbacks. I/O requests are
> submitted and then the code returns back to QEMU's main loop. When the
> I/O request completes, a callback is invoked.
>
> Examples: block/rbd.c or block/qed.c.
>
HLFS do not use QEMU's AIO way. HLFS, itself, has realized internal AIO.
--
Thanks
Harry Wei
- [Qemu-devel] [PATCH] HLFS driver for QEMU, harryxiyou, 2013/03/16
- [Qemu-devel] [PATCH] HLFS driver for QEMU, harryxiyou, 2013/03/18
- [Qemu-devel] [PATCH] HLFS driver for QEMU, harryxiyou, 2013/03/18
- Re: [Qemu-devel] [PATCH] HLFS driver for QEMU, Stefan Hajnoczi, 2013/03/18
- Re: [Qemu-devel] [PATCH] HLFS driver for QEMU, harryxiyou, 2013/03/18
- Re: [Qemu-devel] [PATCH] HLFS driver for QEMU, Stefan Hajnoczi, 2013/03/18
- Re: [Qemu-devel] [PATCH] HLFS driver for QEMU, harryxiyou, 2013/03/20
- Re: [Qemu-devel] [PATCH] HLFS driver for QEMU, Stefan Hajnoczi, 2013/03/20
- Re: [Qemu-devel] [PATCH] HLFS driver for QEMU, harryxiyou, 2013/03/20
- Re: [Qemu-devel] [PATCH] HLFS driver for QEMU,
harryxiyou <=
- Re: [Qemu-devel] [PATCH] HLFS driver for QEMU, Stefan Hajnoczi, 2013/03/28