Re: [PATCH v2 16/16] virtio: make it possible to detach host notifier from any thread

2023-04-20 Thread Juan Quintela
Stefan Hajnoczi wrote: > On Wed, 19 Apr 2023 at 14:52, Eric Blake wrote: >> >> On Wed, Apr 19, 2023 at 01:28:17PM -0400, Stefan Hajnoczi wrote: >> > virtio_queue_aio_detach_host_notifier() does two things: >> > 1. It removes the fd handler from the event loop. >> > 2. It processes the virtqueue o

Re: [PATCH v2 16/16] virtio: make it possible to detach host notifier from any thread

2023-04-20 Thread Stefan Hajnoczi
On Wed, 19 Apr 2023 at 14:52, Eric Blake wrote: > > On Wed, Apr 19, 2023 at 01:28:17PM -0400, Stefan Hajnoczi wrote: > > virtio_queue_aio_detach_host_notifier() does two things: > > 1. It removes the fd handler from the event loop. > > 2. It processes the virtqueue one last time. > > > > The first

Re: [PATCH v2 16/16] virtio: make it possible to detach host notifier from any thread

2023-04-19 Thread Eric Blake
On Wed, Apr 19, 2023 at 01:28:17PM -0400, Stefan Hajnoczi wrote: > virtio_queue_aio_detach_host_notifier() does two things: > 1. It removes the fd handler from the event loop. > 2. It processes the virtqueue one last time. > > The first step can be peformed by any thread and without taking the > A

[PATCH v2 16/16] virtio: make it possible to detach host notifier from any thread

2023-04-19 Thread Stefan Hajnoczi
virtio_queue_aio_detach_host_notifier() does two things: 1. It removes the fd handler from the event loop. 2. It processes the virtqueue one last time. The first step can be peformed by any thread and without taking the AioContext lock. The second step may need the AioContext lock (depending on t