From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel@nongnu.org, Eric Blake <eblake@redhat.com>,
kwolf@redhat.com, Fam Zheng <fam@euphon.net>,
Juan Quintela <quintela@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
Hanna Reitz <hreitz@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-block@nongnu.org, Leonardo Bras <leobras@redhat.com>,
Coiby Xu <Coiby.Xu@gmail.com>, Peter Xu <peterx@redhat.com>
Subject: Re: [PATCH 2/2] io: follow coroutine AioContext in qio_channel_yield()
Date: Fri, 25 Aug 2023 09:09:09 +0100 [thread overview]
Message-ID: <ZOhhpVJgNxMmAMEH@redhat.com> (raw)
In-Reply-To: <20230824182642.GA1698358@fedora>
On Thu, Aug 24, 2023 at 02:26:42PM -0400, Stefan Hajnoczi wrote:
> I've done most of the audit necessary to understand which AioContext is
> used where. The call graph is large because qio_channel_yield() is used
> internally by qio_channel_readv_full_all_eof(),
> qio_channel_writev_full_all(), and their variants. They would all need
> a new AioContext argument.
Argh, I forgot about that usage.
> I think it's not worth passing AioContext explicitly everywhere since
> this involves a lot of code changes and more verbosity to achieve what
> we already have.
Yeah, I agree with you.
>
> However, If you think the QIOChannel API should pass AioContext
> explicitly then I'll go ahead and make the changes.
>
> Here is what I've explored so far:
>
> qio_channel_readv_full_all_eof
> mpqemu_read - should be doable
> qio_channel_readv_all_eof
> qio_channel_read_all_eof
> multifd_recv_thread - NULL non-coroutine
> vu_message_read - coroutine AioContext
> qio_channel_readv_full_all
> hw/virtio/vhost-user.c:backend_read() - NULL non-coroutine
> qio_channel_readv_all
> nbd_co_receive_offset_data_payload - coroutine AioContext
> nbd_co_do_receive_one_chunk - coroutine AioContext
> qio_channel_read_all
> hw/virtio/vhost-user.c:backend_read() - NULL non-coroutine
> tpm_emulator_unix_tx_bufs - NULL non-coroutine
> nbd_read - ?
> zlib_recv_pages - NULL non-coroutine
> zstd_recv_pages - NULL non-coroutine
> multifd_initial_recv_packet - NULL non-coroutine
> nbd_opt_read - iohandler
> pr_manager_helper_read - NULL non-coroutine
> prh_read_request - coroutine AioContext
> prh_co_entry - coroutine AioContext
> char_socket_ping_pong - NULL non-coroutine
> nocomp_recv_pages - NULL non-coroutine
> test_io_thread_reader - NULL non-coroutine
> qio_channel_writev_full_all
> mpqemu_msg_send - should be doable
> qio_channel_writev_all
> nbd_co_send_request - coroutine AioContext
> hw/virtio/vhost-user.c:backend_read() - NULL non-coroutine
> qio_channel_write_all
> tpm_emulator_unix_tx_bufs - NULL non-coroutine
> multifd_send_initial_packet - NULL non-coroutine
> multifd_send_thread - NULL non-coroutine
> nbd_write - ?
> prh_write_response - coroutine AioContext
> prh_co_entry - coroutine AioContext
> char_socket_ping_pong - NULL non-coroutine
> ppm_save - iohandler
> qemu_fflush - ?
> nbd_negotiate_send_meta_context - iohandler
> nbd/server.c:nbd_co_send_iov - cooroutine AioContext
> test_io_thread_writer - NULL non-coroutine
> multifd_send_thread - NULL non-coroutine
> qemu_fill_buffer - ?
>
> What do you think?
>
> Stefan
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2023-08-25 8:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 23:45 [PATCH 0/2] io: follow coroutine AioContext in qio_channel_yield() Stefan Hajnoczi
2023-08-23 23:45 ` [PATCH 1/2] io: check there are no qio_channel_yield() coroutines during ->finalize() Stefan Hajnoczi
2023-08-24 11:01 ` Daniel P. Berrangé
2023-08-24 18:18 ` Eric Blake
2023-08-23 23:45 ` [PATCH 2/2] io: follow coroutine AioContext in qio_channel_yield() Stefan Hajnoczi
2023-08-24 11:26 ` Daniel P. Berrangé
2023-08-24 17:07 ` Stefan Hajnoczi
2023-08-24 18:26 ` Stefan Hajnoczi
2023-08-25 8:09 ` Daniel P. Berrangé [this message]
2023-08-24 16:09 ` Fabiano Rosas
2023-08-24 17:29 ` Stefan Hajnoczi
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=ZOhhpVJgNxMmAMEH@redhat.com \
--to=berrange@redhat.com \
--cc=Coiby.Xu@gmail.com \
--cc=eblake@redhat.com \
--cc=fam@euphon.net \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=leobras@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@redhat.com \
--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.