Re: [PATCH 2/2] io: follow coroutine AioContext in qio_channel_yield()

2023-08-25 Thread Daniel P . Berrangé
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(),

Re: [PATCH 2/2] io: follow coroutine AioContext in qio_channel_yield()

2023-08-24 Thread Stefan Hajnoczi
On Thu, Aug 24, 2023 at 12:26:05PM +0100, Daniel P. Berrangé wrote: > On Wed, Aug 23, 2023 at 07:45:04PM -0400, Stefan Hajnoczi wrote: > > The ongoing QEMU multi-queue block layer effort makes it possible for > > multiple > > threads to process I/O in parallel. The nbd block driver is not

Re: [PATCH 2/2] io: follow coroutine AioContext in qio_channel_yield()

2023-08-24 Thread Stefan Hajnoczi
On Thu, Aug 24, 2023 at 01:09:59PM -0300, Fabiano Rosas wrote: > Stefan Hajnoczi writes: > > > @@ -2089,10 +2088,6 @@ static void nbd_attach_aio_context(BlockDriverState > > *bs, > > * the reconnect_delay_timer cannot be active here. > > */ > >

Re: [PATCH 2/2] io: follow coroutine AioContext in qio_channel_yield()

2023-08-24 Thread Stefan Hajnoczi
On Thu, Aug 24, 2023 at 12:26:05PM +0100, Daniel P. Berrangé wrote: > On Wed, Aug 23, 2023 at 07:45:04PM -0400, Stefan Hajnoczi wrote: > > The ongoing QEMU multi-queue block layer effort makes it possible for > > multiple > > threads to process I/O in parallel. The nbd block driver is not

Re: [PATCH 2/2] io: follow coroutine AioContext in qio_channel_yield()

2023-08-24 Thread Fabiano Rosas
Stefan Hajnoczi writes: > @@ -2089,10 +2088,6 @@ static void nbd_attach_aio_context(BlockDriverState > *bs, > * the reconnect_delay_timer cannot be active here. > */ > assert(!s->reconnect_delay_timer); > - > -if (s->ioc) { > -qio_channel_attach_aio_context(s->ioc,

Re: [PATCH 2/2] io: follow coroutine AioContext in qio_channel_yield()

2023-08-24 Thread Daniel P . Berrangé
On Wed, Aug 23, 2023 at 07:45:04PM -0400, Stefan Hajnoczi wrote: > The ongoing QEMU multi-queue block layer effort makes it possible for multiple > threads to process I/O in parallel. The nbd block driver is not compatible > with > the multi-queue block layer yet because QIOChannel cannot be used

[PATCH 2/2] io: follow coroutine AioContext in qio_channel_yield()

2023-08-23 Thread Stefan Hajnoczi
The ongoing QEMU multi-queue block layer effort makes it possible for multiple threads to process I/O in parallel. The nbd block driver is not compatible with the multi-queue block layer yet because QIOChannel cannot be used easily from coroutines running in multiple threads. This series changes