qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: handling -EAGAIN for !s->io_q


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: handling -EAGAIN for !s->io_q.plugged case
Date: Mon, 24 Nov 2014 12:54:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0


On 24/11/2014 12:49, Ming Lei wrote:
> On Mon, Nov 24, 2014 at 7:38 PM, Paolo Bonzini <address@hidden> wrote:
>>
>>
>> On 24/11/2014 12:31, Ming Lei wrote:
>>> +    /* don't submit until next completion for -EAGAIN of non plug case */
>>> +    if (unlikely(!s->io_q.plugged)) {
>>> +        return 0;
>>> +    }
>>> +
>>>      /* submit immediately if queue depth is above 2/3 */
>>>      if (idx > s->io_q.size * 2 / 3) {
>>>          return ioq_submit(s);
>>       }
>>
>>       return 0;
>>
>> so I fail to see why my proposal:
>>
>>
>>     /* This is reached in two cases: queue not plugged but io_submit
>>      * returned -EAGAIN, or queue plugged.  In the latter case, start
>>      * submitting some I/O if the queue is getting too full.  In the
>>      * former case, instead, wait until an I/O operation is completed.
>>      */
>>     if (likely(idx <= s->io_q.size * 2 / 3) || unlikely(!s->io_q.plugged) {
>>         return 0;
>>     }
>>
>>     return ioq_submit(s);
>>
>> was wrong.  Can you explain?
> 
> I didn't say your proposal is wrong, and this patch is correct too
> without fat comment.
> 
> The difference is only that this patch returns immediately in case
> of !s->io_q.plugged after putting the req into io queue.

There is no difference in the behavior of the code, right?

The maintainers can decide if they want a v5 of this patch.

Thanks,

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]