qemu-e2k/include/block
Paolo Bonzini 81f730d4d0 block, block-backend: write some hot coroutine wrappers by hand
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>
2023-04-11 16:46:49 +02:00
..
accounting.h block: pass OnOffAuto instead of bool to block_acct_setup() 2022-09-30 18:02:30 +02:00
aio_task.h coroutine: Move coroutine_fn to qemu/osdep.h, trim includes 2023-01-19 10:18:28 +01:00
aio-wait.h aio-wait: switch to smp_mb__after_rmw() 2023-03-07 12:39:50 +01:00
aio.h aio: make aio_set_fd_poll() static to aio-posix.c 2023-03-13 15:23:37 +04:00
block_backup.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
block_int-common.h block: remove has_variable_length from BlockDriver 2023-04-11 16:39:01 +02:00
block_int-global-state.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
block_int-io.h block: Mark bdrv_co_refresh_total_sectors() and callers GRAPH_RDLOCK 2023-02-23 19:49:33 +01:00
block_int.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
block-common.h block-coroutine-wrapper: Introduce no_co_wrapper 2023-02-17 11:22:19 +01:00
block-copy.h block: Mark bdrv_co_block_status() and callers GRAPH_RDLOCK 2023-02-23 19:49:07 +01:00
block-global-state.h block: Mark bdrv_co_create() and callers GRAPH_RDLOCK 2023-02-23 19:49:23 +01:00
block-hmp-cmds.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
block-io.h block, block-backend: write some hot coroutine wrappers by hand 2023-04-11 16:46:49 +02:00
block.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
blockjob_int.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
blockjob.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
dirty-bitmap.h block: Mark bdrv_*_dirty_bitmap() and callers GRAPH_RDLOCK 2023-02-23 19:49:32 +01:00
export.h
fuse.h
graph-lock.h block: Clean up includes 2023-02-08 07:28:05 +01:00
nbd.h block/nbd: Add missing <qemu/bswap.h> include 2023-02-01 16:52:32 +01:00
nvme.h hw/nvme: flexible data placement emulation 2023-03-06 15:28:02 +01:00
qapi.h qemu-img: Change info key names for protocol nodes 2023-02-01 16:52:33 +01:00
qdict.h
raw-aio.h coroutine: Clean up superfluous inclusion of qemu/coroutine.h 2023-01-19 10:18:28 +01:00
replication.h
reqlist.h
snapshot.h
thread-pool.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
throttle-groups.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
write-threshold.h block: Clean up includes 2023-02-08 07:28:05 +01:00