qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [QEMU-devel][PATCH v3] aio-posix: Fix concurrent aio_po


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [QEMU-devel][PATCH v3] aio-posix: Fix concurrent aio_poll/set_fd_handler.
Date: Wed, 19 Dec 2018 20:32:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

On 19/12/18 17:29, Remy NOEL wrote:
>>
>>
>>>                  atomic_read(&ctx->poll_disable_cnt) +
>>> poll_disable_change);
>>>   -    aio_epoll_update(ctx, node, is_new);
>>> +    if (new_node) {
>>> +        aio_epoll_update(ctx, new_node, is_new);
>>> +    }
>>>       qemu_lockcnt_unlock(&ctx->list_lock);
>>>       aio_notify(ctx);
>> ... so I think this should be "if (node || new_node)"?
> 
> Well, currently, when an AioHandler is removed, we do not change
> node->pdf.events (only revents).
> 
> Therefore a call to aio_epoll_update on node will only result in a call
> to epoll_ctl with EPOLL_CTL_MOD and the same event, which seems kinda
> pointless.
> 
> we may set node->pfd.events to 0 to unregister the file descriptor, but
> this would change the behavior compared to current handling of node
> deletion if i'm not mistaken.

You found another bug then. :)

Paolo



reply via email to

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