qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] [PATCHv10 00/31] aio / timers: Add AioContext tim


From: Alex Bligh
Subject: Re: [Qemu-devel] [RFC] [PATCHv10 00/31] aio / timers: Add AioContext timers and use ppoll
Date: Tue, 13 Aug 2013 14:56:56 +0100

On 13 Aug 2013, at 14:45, Jan Kiszka wrote:

> Yeah:
> 
> -    /* No AIO operations?  Get us out of here */
> -    if (!busy) {
> +    /* early return if we only have the aio_notify() fd */
> +    if (ctx->pollfds->len == 1) {
>         return progress;
>     }
> 
> So this is even worse for my use case.

Oh yes :-) OK, well Stefan's patch series is thus more
predictable, but I think still wrong (to be fair to
Stefan, his patch was made before it made sense for
aio_poll to be called with no FDs bar the eventfd
and blocking=1)

I think it should be:

-    /* No AIO operations?  Get us out of here */
-    if (!busy) {
+    /* early return if we only have the aio_notify() fd */
+    if (!blocking && (ctx->pollfds->len == 1)) {
        return progress;
    }

And perhaps <=1 for safety.

-- 
Alex Bligh







reply via email to

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