[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 12/21] xen-block: implement BlockDevOps->drained_begin()


  • To: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 16 May 2023 15:24:07 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <qemu-devel@xxxxxxxxxx>, Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>, Aarushi Mehta <mehta.aaru20@xxxxxxxxx>, <qemu-block@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Peter Lieven <pl@xxxxxxx>, Stefan Weil <sw@xxxxxxxxxxx>, Xie Yongji <xieyongji@xxxxxxxxxxxxx>, Kevin Wolf <kwolf@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Leonardo Bras <leobras@xxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>, Hanna Reitz <hreitz@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Coiby Xu <Coiby.Xu@xxxxxxxxx>, Eduardo Habkost <eduardo@xxxxxxxxxxx>, Stefano Garzarella <sgarzare@xxxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, Daniel P. Berrangé <berrange@xxxxxxxxxx>, Julia Suvorova <jusual@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <eesposit@xxxxxxxxxx>, Juan Quintela <quintela@xxxxxxxxxx>, "Richard W.M. Jones" <rjones@xxxxxxxxxx>, Fam Zheng <fam@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>
  • Delivery-date: Tue, 16 May 2023 14:24:36 +0000
  • Ironport-data: A9a23:B5L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DwKDwQeCB2QaAXOb C7/cR9qz+paR0sH7+G7ilsZZmkmzXT/qiWGCI7Ow==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, May 04, 2023 at 03:53:18PM -0400, Stefan Hajnoczi wrote:
> Detach event channels during drained sections to stop I/O submission
> from the ring. xen-block is no longer reliant on aio_disable_external()
> after this patch. This will allow us to remove the
> aio_disable_external() API once all other code that relies on it is
> converted.
> 
> Extend xen_device_set_event_channel_context() to allow ctx=NULL. The
> event channel still exists but the event loop does not monitor the file
> descriptor. Event channel processing can resume by calling
> xen_device_set_event_channel_context() with a non-NULL ctx.
> 
> Factor out xen_device_set_event_channel_context() calls in
> hw/block/dataplane/xen-block.c into attach/detach helper functions.
> Incidentally, these don't require the AioContext lock because
> aio_set_fd_handler() is thread-safe.
> 
> It's safer to register BlockDevOps after the dataplane instance has been
> created. The BlockDevOps .drained_begin/end() callbacks depend on the
> dataplane instance, so move the blk_set_dev_ops() call after
> xen_block_dataplane_create().
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>

Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Thanks,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.