|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 0/3] block: introduce submit I/O at batch |
Date: | Mon, 30 Jun 2014 13:10:00 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
Il 30/06/2014 11:49, Ming Lei ha scritto:
Hi, The commit 580b6b2aa2(dataplane: use the QEMU block layer for I/O) introduces ~40% throughput regression on virtio-blk dataplane, and one of causes is that submitting I/O at batch is removed. This patchset trys to introduce this mechanism on block, at least, linux-aio can benefit from that. With these patches, it is observed that thoughout on virtio-blk dataplane can be improved a lot, see data in commit log of patch 3/3. It should be possible to apply the batch mechanism to other devices (such as virtio-scsi) too.
The basic idea of the code is great, however I do not think it is necessary to add the logic in AioContext. You are right that io_submit supports multiple I/O, but right now we have one io_context_t per BlockDriverState so it is somewhat premature. Note that AioContext in QEMU means something else than io_context_t.
I don't think it's necessary to walk backing_hd too (especially because we're close to release and this cannot be a regression---dataplane in 2.0 didn't support backing files at all!). We need to keep the patches as simple as possible.
You can just add bdrv_plug/bdrv_unplug callbacks to block/linux-aio.c and, in block.c, something like
BlockDriver *drv = bs->drv; if (drv && drv->bdrv_plug) { drv->bdrv_plug(bdrv); } else if (bs->file) { bdrv_plug(bs->file); }and place all the queuing logic in linux-aio.c. It should be obvious to the reviewer that the patch only affects dataplane.
(Also, note that QEMU doesn't use __ as the prefix for internal function). Thanks for the patch! Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |