[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v1 01/18] block/io: add bdrv_aio_{preadv, pwrite
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH v1 01/18] block/io: add bdrv_aio_{preadv, pwritev} |
Date: |
Wed, 23 Nov 2016 15:28:51 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 15.11.2016 um 07:36 hat Pavel Butsykin geschrieben:
> It's just byte-based wrappers over bdrv_co_aio_prw_vector(), which provide
> a byte-based interface for AIO read/write.
>
> Signed-off-by: Pavel Butsykin <address@hidden>
I'm in the process to phase out the last users of bdrv_aio_*() so that
this set of interfaces can be removed. I'm doing this because it's an
unnecessary redundancy, we have too many wrapper functions that expose
the same functionality with different syntax. So let's not add new
users.
At first sight, you don't even seem to use bdrv_aio_preadv() for actual
parallelism, but you often have a pattern like this:
void foo_cb(void *opaque)
{
...
qemu_coroutine_enter(acb->co);
}
void caller()
{
...
acb = bdrv_aio_preadv(...);
qemu_coroutine_yield();
}
The code will actually become a lot simpler if you use bdrv_co_preadv()
instead because you don't have to have a callback, but you get pure
sequential code.
The part that actually has some parallelism, pcache_readahead_request(),
already creates its own coroutine, so it runs in the background without
using callback-style interfaces.
Kevin
- [Qemu-block] [PATCH v1 06/18] block/pcache: statistics collection read requests, (continued)
- [Qemu-block] [PATCH v1 11/18] block/pcache: cache invalidation on AIO write requests, Pavel Butsykin, 2016/11/15
- [Qemu-block] [PATCH v1 15/18] block/pcache: drop used pcache nodes, Pavel Butsykin, 2016/11/15
- [Qemu-block] [PATCH v1 17/18] block/pcache: add tracepoints, Pavel Butsykin, 2016/11/15
- [Qemu-block] [PATCH v1 18/18] block/pcache: debug build, Pavel Butsykin, 2016/11/15
- [Qemu-block] [PATCH v1 01/18] block/io: add bdrv_aio_{preadv, pwritev}, Pavel Butsykin, 2016/11/15
- Re: [Qemu-block] [PATCH v1 01/18] block/io: add bdrv_aio_{preadv, pwritev},
Kevin Wolf <=
[Qemu-block] [PATCH v1 09/18] block/pcache: add AIO readahead, Pavel Butsykin, 2016/11/15
[Qemu-block] [PATCH v1 16/18] block/pcache: write through, Pavel Butsykin, 2016/11/15
Re: [Qemu-block] [Qemu-devel] [PATCH v1 00/18] I/O prefetch cache, no-reply, 2016/11/15