[GEDI] [PATCH v7 12/13] blkio: implement BDRV_REQ_REGISTERED_BUF optimization

Stefano Garzarella sgarzare at redhat.com
Wed Oct 19 09:51:02 UTC 2022


On Thu, Oct 13, 2022 at 02:59:07PM -0400, Stefan Hajnoczi wrote:
>Avoid bounce buffers when QEMUIOVector elements are within previously
>registered bdrv_register_buf() buffers.
>
>The idea is that emulated storage controllers will register guest RAM
>using bdrv_register_buf() and set the BDRV_REQ_REGISTERED_BUF on I/O
>requests. Therefore no blkio_map_mem_region() calls are necessary in the
>performance-critical I/O code path.
>
>This optimization doesn't apply if the I/O buffer is internally
>allocated by QEMU (e.g. qcow2 metadata). There we still take the slow
>path because BDRV_REQ_REGISTERED_BUF is not set.
>
>Signed-off-by: Stefan Hajnoczi <stefanha at redhat.com>
>---
> block/blkio.c | 183 +++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 180 insertions(+), 3 deletions(-)

Reviewed-by: Stefano Garzarella <sgarzare at redhat.com>



More information about the integration mailing list