[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 04/19] block: Don't manually poll in bdrv_drain_
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH 04/19] block: Don't manually poll in bdrv_drain_all() |
Date: |
Fri, 20 Apr 2018 15:11:12 +0800 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Wed, Apr 11, 2018 at 06:39:25PM +0200, Kevin Wolf wrote:
> All involved nodes are already idle, we called bdrv_do_draine_begin() on
> them.
>
> The comment in the code suggested that this were not correct because the
> completion of a request on one node could spawn a new request on a
> different node (which might have been drained before, so we wouldn't
> drain the new request). In reality, new requests to different nodes
> aren't spawned out of nothing, but only in the context of a parent
> request, and they aren't submitted to random nodes, but only to child
> nodes. As long as we still poll for the completion of the parent request
> (which we do), draining each root node separately is good enough.
>
> Remove the additional polling code from bdrv_drain_all_begin() and
> replace it with an assertion that all nodes are already idle after we
> drained them separately.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/io.c | 41 ++++++++++++-----------------------------
> 1 file changed, 12 insertions(+), 29 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature
- Re: [Qemu-block] [PATCH 07/19] block: Really pause block jobs on drain, (continued)
- Re: [Qemu-block] [PATCH 07/19] block: Really pause block jobs on drain, Kevin Wolf, 2018/04/12
- Re: [Qemu-block] [PATCH 07/19] block: Really pause block jobs on drain, Paolo Bonzini, 2018/04/12
- Re: [Qemu-block] [PATCH 07/19] block: Really pause block jobs on drain, Kevin Wolf, 2018/04/13
- Re: [Qemu-block] [PATCH 07/19] block: Really pause block jobs on drain, Paolo Bonzini, 2018/04/13
- Re: [Qemu-block] [PATCH 07/19] block: Really pause block jobs on drain, Kevin Wolf, 2018/04/13
[Qemu-block] [PATCH 06/19] block: Avoid unnecessary aio_poll() in AIO_WAIT_WHILE(), Kevin Wolf, 2018/04/11
[Qemu-block] [PATCH 04/19] block: Don't manually poll in bdrv_drain_all(), Kevin Wolf, 2018/04/11
[Qemu-block] [PATCH 01/19] test-bdrv-drain: bdrv_drain() works with cross-AioContext events, Kevin Wolf, 2018/04/11
[Qemu-block] [PATCH 09/19] test-bdrv-drain: Add test for node deletion, Kevin Wolf, 2018/04/11
[Qemu-block] [PATCH 11/19] test-bdrv-drain: Test node deletion in subtree recursion, Kevin Wolf, 2018/04/11
[Qemu-block] [PATCH 10/19] block: Drain recursively with a single BDRV_POLL_WHILE(), Kevin Wolf, 2018/04/11
[Qemu-block] [PATCH 12/19] block: Don't poll in parent drain callbacks, Kevin Wolf, 2018/04/11
[Qemu-block] [PATCH 14/19] block: Defer .bdrv_drain_begin callback to polling phase, Kevin Wolf, 2018/04/11
[Qemu-block] [PATCH 16/19] block: Allow AIO_WAIT_WHILE with NULL ctx, Kevin Wolf, 2018/04/11