[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch
From: |
Ming Lei |
Subject: |
Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch |
Date: |
Wed, 26 Nov 2014 17:15:44 +0800 |
On Wed, Nov 26, 2014 at 12:18 AM, Stefan Hajnoczi <address@hidden> wrote:
>>
>> You mean the abort BH may not have chance to run before its deletion
>> in the detach callback?
>
> Exactly. Any time you schedule a BH you need to be aware of things that
> may happen before the BH is invoked.
>
>> If so, bdrv_drain_all() from bdrv_set_aio_context() should have
>> handled the pending BH, right?
>
> I'm not sure if it's good to make subtle assumptions like that. If the
> code changes they will break.
IMO, that should be the purpose of bdrv_drain_all(), at least from
its comment:
/* ensure there are no in-flight requests */
If it changes in future, the general problem has to be considered.
> Since it is very easy to protect against this case (the code I posted
> before), it seems worthwhile to be on the safe side.
Given there hasn't the potential problem in current tree, could you
agree on merging it first?
BTW, there isn't sort of handling for 'completion_bh' of linux aio too, :-)
Thanks,
Ming Lei
- [Qemu-devel] [PATCH v6 0/3] linux-aio: fix batch submission, Ming Lei, 2014/11/25
- [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch, Ming Lei, 2014/11/25
- Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch, Stefan Hajnoczi, 2014/11/25
- Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch, Ming Lei, 2014/11/25
- Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch, Stefan Hajnoczi, 2014/11/25
- Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch,
Ming Lei <=
- Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch, Stefan Hajnoczi, 2014/11/27
- Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch, Paolo Bonzini, 2014/11/27
- Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch, Ming Lei, 2014/11/27
Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch, Kevin Wolf, 2014/11/26
Re: [Qemu-devel] [PATCH v6 1/3] linux-aio: fix submit aio as a batch, Kevin Wolf, 2014/11/26
[Qemu-devel] [PATCH v6 2/3] linux-aio: handling -EAGAIN for !s->io_q.plugged case, Ming Lei, 2014/11/25