On Wed, Apr 07, 2021 at 04:35:00PM +0200, Greg Kurz wrote:
> Host notifiers are guaranteed to be idle until the callbacks are
> hooked up with virtio_queue_aio_set_host_notifier_handler(). They
> thus don't need to be set or unset with the AioContext lock held.
> 
> Do this outside the critical section, like virtio-blk already
> does : basically downgrading virtio_scsi_vring_init() to only
> setup the host notifier and set the callback in the caller.
> 
> This will allow to batch addition/deletion of ioeventds in
> a single memory transaction, which is expected to greatly
> improve initialization time.
> 
> Signed-off-by: Greg Kurz <gr...@kaod.org>
> ---
>  hw/scsi/virtio-scsi-dataplane.c | 40 ++++++++++++++++++---------------
>  1 file changed, 22 insertions(+), 18 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>

Attachment: signature.asc
Description: PGP signature

Reply via email to