Kevin, any advice? Fabiano Rosas <faro...@suse.de> writes:
> Is there a way to execute a long-standing QMP command outside of the > BQL? > > The situation we're seeing is a slow query-block due to a slow system > call (fstat over NFS) causing the main thread to spend too long > holding the global mutex and locking up the vcpu thread when it goes > out of the guest for MMIO. > > The call chain for QMP is: > > qmp_query_block > bdrv_query_info > bdrv_block_device_info > bdrv_query_image_info > bdrv_do_query_node_info > bdrv_get_allocated_file_size > bdrv_poll_co <- Waiting with qemu_global_mutex locked > > [coroutine] bdrv_co_get_allocated_file_size_entry > bdrv_co_get_allocated_file_size > raw_co_get_allocated_file_size > fstat <- SLOW! > > The closest I got was moving the coroutine into a separate iothread, > unlocking the global mutex and releasing the bdrv aio_context around > aio_poll. It feels wrong though because we're technically still > operating on the block state but not holding the context. > > Is there a more standard way if doing this? Is it possible at all?