All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org,  kwolf@redhat.com,  eesposit@redhat.com,
	vsementsov@yandex-team.ru
Subject: Re: Question about QMP and BQL
Date: Mon, 15 May 2023 13:08:01 +0200	[thread overview]
Message-ID: <87y1lpyhri.fsf@pond.sub.org> (raw)
In-Reply-To: <87h6sh2zug.fsf@suse.de> (Fabiano Rosas's message of "Fri, 12 May 2023 15:01:43 -0300")

Kevin, any advice?

Fabiano Rosas <farosas@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?



  reply	other threads:[~2023-05-15 11:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 18:01 Question about QMP and BQL Fabiano Rosas
2023-05-15 11:08 ` Markus Armbruster [this message]
2023-05-15 13:18 ` Kevin Wolf
2023-05-16 15:13   ` Fabiano Rosas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y1lpyhri.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=eesposit@redhat.com \
    --cc=farosas@suse.de \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.