81f730d4d0
The introduction of the graph lock is causing blk_get_geometry, a hot function used in the I/O path, to create a coroutine. However, the only part that really needs to run in coroutine context is the call to bdrv_co_refresh_total_sectors, which in turn only happens in the rare case of host CD-ROM devices. So, write by hand the three wrappers on the path from blk_co_get_geometry to bdrv_co_refresh_total_sectors, so that the coroutine wrapper is only created if bdrv_nb_sectors actually calls bdrv_refresh_total_sectors. Reported-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20230407153303.391121-9-pbonzini@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
||
---|---|---|
.. | ||
accounting.h | ||
aio_task.h | ||
aio-wait.h | ||
aio.h | ||
block_backup.h | ||
block_int-common.h | ||
block_int-global-state.h | ||
block_int-io.h | ||
block_int.h | ||
block-common.h | ||
block-copy.h | ||
block-global-state.h | ||
block-hmp-cmds.h | ||
block-io.h | ||
block.h | ||
blockjob_int.h | ||
blockjob.h | ||
dirty-bitmap.h | ||
export.h | ||
fuse.h | ||
graph-lock.h | ||
nbd.h | ||
nvme.h | ||
qapi.h | ||
qdict.h | ||
raw-aio.h | ||
replication.h | ||
reqlist.h | ||
snapshot.h | ||
thread-pool.h | ||
throttle-groups.h | ||
write-threshold.h |