[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-aio: fix submit aio as a batch
From: |
Ming Lei |
Subject: |
Re: [Qemu-devel] [PATCH] linux-aio: fix submit aio as a batch |
Date: |
Wed, 9 Jul 2014 09:33:15 +0800 |
On Wed, Jul 9, 2014 at 1:41 AM, Paolo Bonzini <address@hidden> wrote:
> Il 08/07/2014 17:45, Ming Lei ha scritto:
>
>>
>> - /* empty io queue */
>> - s->io_q.idx = 0;
>> + ret = io_submit(s->ctx, len, s->io_q.iocbs);
>> + if (ret == -EAGAIN) {
>> + event_notifier_set(&s->retry);
>> + return 0;
>
>
> You can use a bottom half instead of this event notifier.
It is a intended use of event notifier, and from my observation, after
one cycle of write() and ppoll(), the next io_submit() is a bit easier to
succeed than using BH.
Given it doesn't happen often, it should be ok to use event notifier.
Thanks,