diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-12-17 16:09:58 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-01-13 11:47:55 +0000 |
commit | fcf5def1ab0f94ff120b7141c943b517d2ece83d (patch) | |
tree | 7ef226e4d84faf66f58d2b0615f1f3afcae2eb51 | |
parent | b8aff7d6bfa1632d722f47a1a6bca679221b6db3 (diff) |
block: mark AioContext as recursive
AioContext can be accessed recursively, in fact that's what we do with
aio_poll. Marking the GSource as recursive avoids that GLib blocks it
and unblocks it around every call to aio_dispatch, which is a pretty
expensive operation.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | async.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -300,6 +300,7 @@ AioContext *aio_context_new(Error **errp) error_setg_errno(errp, -ret, "Failed to initialize event notifier"); return NULL; } + g_source_set_can_recurse(&ctx->source, true); aio_set_event_notifier(ctx, &ctx->notifier, (EventNotifierHandler *) event_notifier_test_and_clear); |