Skip to content

Commit

Permalink
aio-posix: Don't count ctx->notifier as progress when polling
Browse files Browse the repository at this point in the history
The same logic exists in fd polling. This change is especially important
to avoid busy loop once we limit aio_notify_accept() to blocking
aio_poll().

Cc: qemu-stable@nongnu.org
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20180809132259.18402-2-famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
(cherry picked from commit 70232b5)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
Fam Zheng authored and mdroth committed Mar 19, 2019
1 parent ac14189 commit 98f6f21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/aio-posix.c
Expand Up @@ -494,7 +494,8 @@ static bool run_poll_handlers_once(AioContext *ctx)
QLIST_FOREACH_RCU(node, &ctx->aio_handlers, node) {
if (!node->deleted && node->io_poll &&
aio_node_check(ctx, node->is_external) &&
node->io_poll(node->opaque)) {
node->io_poll(node->opaque) &&
node->opaque != &ctx->notifier) {
progress = true;
}

Expand Down

0 comments on commit 98f6f21

Please sign in to comment.