[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 00/20] block: remove aio_disable_external() API
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v6 00/20] block: remove aio_disable_external() API |
Date: |
Tue, 30 May 2023 18:24:13 +0200 |
Am 16.05.2023 um 21:02 hat Stefan Hajnoczi geschrieben:
> The aio_disable_external() API temporarily suspends file descriptor monitoring
> in the event loop. The block layer uses this to prevent new I/O requests being
> submitted from the guest and elsewhere between bdrv_drained_begin() and
> bdrv_drained_end().
>
> While the block layer still needs to prevent new I/O requests in drained
> sections, the aio_disable_external() API can be replaced with
> .drained_begin/end/poll() callbacks that have been added to BdrvChildClass and
> BlockDevOps.
>
> This newer .bdrained_begin/end/poll() approach is attractive because it works
> without specifying a specific AioContext. The block layer is moving towards
> multi-queue and that means multiple AioContexts may be processing I/O
> simultaneously.
>
> The aio_disable_external() was always somewhat hacky. It suspends all file
> descriptors that were registered with is_external=true, even if they have
> nothing to do with the BlockDriverState graph nodes that are being drained.
> It's better to solve a block layer problem in the block layer than to have an
> odd event loop API solution.
>
> The approach in this patch series is to implement BlockDevOps
> .drained_begin/end() callbacks that temporarily stop file descriptor handlers.
> This ensures that new I/O requests are not submitted in drained sections.
Thanks, applied to the block branch.
Kevin
- [PATCH v6 11/20] xen-block: implement BlockDevOps->drained_begin(), (continued)
- [PATCH v6 11/20] xen-block: implement BlockDevOps->drained_begin(), Stefan Hajnoczi, 2023/05/16
- [PATCH v6 12/20] hw/xen: do not set is_external=true on evtchn fds, Stefan Hajnoczi, 2023/05/16
- [PATCH v6 13/20] block/export: rewrite vduse-blk drain code, Stefan Hajnoczi, 2023/05/16
- [PATCH v6 14/20] block/export: don't require AioContext lock around blk_exp_ref/unref(), Stefan Hajnoczi, 2023/05/16
- [PATCH v6 15/20] block/fuse: do not set is_external=true on FUSE fd, Stefan Hajnoczi, 2023/05/16
- [PATCH v6 17/20] virtio-blk: implement BlockDevOps->drained_begin(), Stefan Hajnoczi, 2023/05/16
- [PATCH v6 16/20] virtio: make it possible to detach host notifier from any thread, Stefan Hajnoczi, 2023/05/16
- [PATCH v6 19/20] virtio: do not set is_external=true on host notifiers, Stefan Hajnoczi, 2023/05/16
- [PATCH v6 18/20] virtio-scsi: implement BlockDevOps->drained_begin(), Stefan Hajnoczi, 2023/05/16
- [PATCH v6 20/20] aio: remove aio_disable_external() API, Stefan Hajnoczi, 2023/05/16
- Re: [PATCH v6 00/20] block: remove aio_disable_external() API,
Kevin Wolf <=