diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2022-10-13 14:59:07 -0400 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2022-10-26 14:56:42 -0400 |
commit | c5640b3e2f1146e8eea9f9f62db87713388d8bc8 (patch) | |
tree | 08b85c44df71cb9965b484860f1069f7c589a198 /util/oslib-posix.c | |
parent | 701bff24deba59a095c6b5cade15e764d56909f6 (diff) | |
download | qemu-c5640b3e2f1146e8eea9f9f62db87713388d8bc8.zip qemu-c5640b3e2f1146e8eea9f9f62db87713388d8bc8.tar.gz qemu-c5640b3e2f1146e8eea9f9f62db87713388d8bc8.tar.bz2 |
blkio: implement BDRV_REQ_REGISTERED_BUF optimization
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@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-id: 20221013185908.1297568-13-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'util/oslib-posix.c')
0 files changed, 0 insertions, 0 deletions