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 :|


Reply via email to