[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and
From: |
Ming Lei |
Subject: |
Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue |
Date: |
Thu, 3 Jul 2014 18:45:39 +0800 |
On Thu, Jul 3, 2014 at 6:04 PM, Paolo Bonzini <address@hidden> wrote:
> Il 03/07/2014 11:51, Ming Lei ha scritto:
>
>>>> >> +int laio_io_unplug(BlockDriverState *bs, void *aio_ctx, bool unplug)
>>>> >> +{
>>>> >> + struct qemu_laio_state *s = aio_ctx;
>>>> >> + int ret = 0;
>>>> >> +
>>>
>>> >
>>> > How about an assert(s->io_q.plugged > 0); here?
>>
>> how about just adding a warning because flush io queue uses
>> the function too?
>
>
> This suggest that there is a smaller piece of code that both laio_io_unplug
> ad flush io queue should use. However, not that flush io queue is not
> necessary. The only place where you're using it (before a call to
> bdrv_aio_flush) does not need it.
I think it may be needed:
- following requests coming inside handle_notify():
req0, req1, req2-flush, req3
- both req0 and req1 queued
- start to handle req2-flush
- bdrv_co_flush() calls bdrv_co_flush(bs->file), which finally
call raw_aio_flush() to send command, but the 1st two requests
should have been submitted to fs before the flush action
Thanks,
- [Qemu-devel] [PATCH v4 0/3] linux-aio: introduce submit I/O as a batch, Ming Lei, 2014/07/02
- [Qemu-devel] [PATCH v4 1/3] block: block: introduce APIs for submitting IO as, Ming Lei, 2014/07/02
- [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue, Ming Lei, 2014/07/02
- Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue, Kevin Wolf, 2014/07/03
- Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue, Ming Lei, 2014/07/03
- Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue, Paolo Bonzini, 2014/07/03
- Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue,
Ming Lei <=
- Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue, Paolo Bonzini, 2014/07/03
- Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue, Ming Lei, 2014/07/03
- Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue, Kevin Wolf, 2014/07/03
- Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue, Ming Lei, 2014/07/03
- Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue, Kevin Wolf, 2014/07/03
Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue, Stefan Hajnoczi, 2014/07/03
[Qemu-devel] [PATCH v4 3/3] dataplane: submit I/O as a batch, Ming Lei, 2014/07/02