[Top][All Lists]

[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: Remy NOEL
Subject: Re: [Qemu-devel] [QEMU-devel][PATCH v3] aio-posix: Fix concurrent aio_poll/set_fd_handler.
Date: Wed, 19 Dec 2018 17:29:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2

On 12/18/18 6:39 PM, Paolo Bonzini wrote:

On 17/12/18 17:48, address@hidden wrote:
Also, we do not call aio_epoll_update for deleted handlers as this has
no impact whatsoever.
Why?  epoll is used in level-triggered mode, so you do have to remove
the file descriptor...

                 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);
+    }
... 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.


reply via email to

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