Am 27.06.2014 um 06:59 hat Paolo Bonzini geschrieben: > Il 27/06/2014 03:15, Ming Lei ha scritto: > >On Thu, Jun 26, 2014 at 11:57 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > >>We can implement (advisory) calls like bdrv_plug/bdrv_unplug in order to > >>restore the previous levels of performance. > > > >Yes, that is also what I am thinking, or interfaces like bdrv_queue_io() > >and bdrv_submit_io(), which may match with aio interfaces. > > Would you like to try preparing a patch?
Note that there is already an interface in block.c that takes multiple requests at once, bdrv_aio_multiwrite(). It is currently used by virtio-blk, even though not in dataplane mode. It also submits individual requests to the block drivers currently, so effectively it doesn't make a difference, just the problem occurs in the block layer instead of the device. We should either improve bdrv_aio_multiwrite() to submit the requests in a batch to the block drivers, add a bdrv_aio_multiwrite() and use it for dataplane as well (possibly with a flag for disabling the request merging if we want to keep the current behaviour for dataplane); or, if we consider it a bad interface, replace it altogether with the new thing even for normal virtio-blk. If this makes a difference for dataplane, it probably makes a difference for all block devices. Kevin