qemu-e2k/include/sysemu
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
..
accel-blocker.h accel: Clean up includes 2023-02-08 07:28:05 +01:00
accel-ops.h gdbstub: move update guest debug to accel ops 2023-03-07 20:44:09 +00:00
arch_init.h hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
balloon.h qapi: Restrict balloon-related commands to machine code 2020-09-29 15:41:35 +02:00
block-backend-common.h block-backend-common.h: split function pointers in BlockDevOps 2022-03-04 18:18:26 +01:00
block-backend-global-state.h block: Create no_co_wrappers for open functions 2023-02-17 11:22:19 +01:00
block-backend-io.h block, block-backend: write some hot coroutine wrappers by hand 2023-04-11 16:46:49 +02:00
block-backend.h include/sysemu/block-backend: split header into I/O and global state (GS) API 2022-03-04 18:18:25 +01:00
block-ram-registrar.h block: add BlockRAMRegistrar 2022-10-26 14:56:42 -04:00
blockdev.h include/sysemu/blockdev.h: global state API 2022-03-04 18:18:25 +01:00
cpu-throttle.h cpu-throttle: new module, extracted from cpus.c 2020-07-10 18:04:49 -04:00
cpu-timers.h replay: notify vCPU when BH is scheduled 2022-06-06 09:26:53 +02:00
cpus.h exec: Remove unused 'qemu/timer.h' timer 2023-02-27 22:29:01 +01:00
cryptodev-vhost-user.h cryptodev: Fix Lesser GPL version number 2020-10-27 16:48:49 +01:00
cryptodev-vhost.h cryptodev: Fix Lesser GPL version number 2020-10-27 16:48:49 +01:00
cryptodev.h cryptodev: support QoS 2023-03-07 12:38:59 -05:00
device_tree.h device-tree: add re-randomization helper function 2022-10-27 11:34:31 +01:00
dirtylimit.h softmmu/dirtylimit: Implement virtual CPU throttle 2022-07-20 12:15:08 +01:00
dirtyrate.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
dma.h hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult 2022-01-18 12:56:29 +01:00
dump-arch.h dump: Add architecture section and section string table support 2022-10-24 22:30:10 +04:00
dump.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
event-loop-base.h Don't include headers already included by qemu/osdep.h 2023-02-08 07:28:05 +01:00
hax.h accel/hax: Introduce CONFIG_HAX_IS_POSSIBLE 2022-03-06 13:15:42 +01:00
hostmem.h hostmem: Allow for specifying a ThreadContext for preallocation 2022-10-27 11:01:03 +02:00
hvf_int.h arm/hvf: Add a WFI handler 2021-09-21 16:28:26 +01:00
hvf.h include/sysemu: Poison all accelerator CONFIG switches in common code 2021-05-14 12:31:44 +02:00
hw_accel.h accel: Introduce AccelOpsClass::cpus_are_resettable() 2022-03-06 13:15:42 +01:00
iothread.h Introduce event-loop-base abstract class 2022-05-09 10:43:23 +01:00
kvm_int.h kvm/i386: Add xen-evtchn-max-pirq property 2023-03-01 09:09:22 +00:00
kvm_xen.h kvm/i386: Add xen-evtchn-max-pirq property 2023-03-01 09:09:22 +00:00
kvm.h sysemu/kvm: Remove CONFIG_USER_ONLY guard 2023-02-27 22:29:01 +01:00
memory_mapping.h sysemu/memory_mapping: Become target-agnostic 2022-03-06 13:15:42 +01:00
numa.h numa: drop support for '-numa node' (without memory specified) 2020-09-30 19:09:20 +02:00
nvmm.h Only check CONFIG_NVMM when NEED_CPU_H is defined 2021-09-13 13:56:26 +02:00
os-posix.h win32: replace closesocket() with close() wrapper 2023-03-13 15:39:31 +04:00
os-win32.h win32: add qemu_close_socket_osfhandle() 2023-03-21 11:16:03 +04:00
qtest.h cpu-timers, icount: new modules 2020-10-05 16:41:22 +02:00
replay.h replay: Extract core API to 'exec/replay-core.h' 2023-02-27 22:29:01 +01:00
reset.h reset: allow registering handlers that aren't called by snapshot loading 2022-10-27 11:34:31 +01:00
rng-random.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
rng.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
rtc.h rtc: Move RTC function prototypes to their own header 2022-01-28 14:29:46 +00:00
runstate-action.h vl: Add option to avoid stopping VM upon guest panic 2020-12-15 12:51:58 -05:00
runstate.h whpx: Added support for breakpoints and stepping 2022-04-06 14:31:55 +02:00
seccomp.h
stats.h stats: Move QMP commands from monitor/ to stats/ 2023-02-04 07:56:54 +01:00
sysemu.h pci: Move HMP command from hw/pci/pcie_aer.c to pci-hmp-cmds.c 2022-12-19 16:21:56 +01:00
tcg.h accel/tcg: Merge tcg_exec_init into tcg_init_machine 2021-06-11 09:26:28 -07:00
tpm_backend.h sysemu: Make TPM structures inaccessible if CONFIG_TPM is not defined 2021-06-15 10:55:12 -04:00
tpm_util.h tpm: Fix Lesser GPL version number 2020-11-15 16:44:18 +01:00
tpm.h sysemu: tpm: Add a stub function for TPM_IS_CRB 2022-05-06 09:06:50 -06:00
vhost-user-backend.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
watchdog.h watchdog: remove -watchdog option 2022-09-29 11:40:28 +02:00
whpx.h include/sysemu: Poison all accelerator CONFIG switches in common code 2021-05-14 12:31:44 +02:00
xen-mapcache.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
xen.h sysemu/xen: Add missing 'exec/cpu-common.h' header for ram_addr_t type 2020-09-30 19:11:36 +02:00