[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 03/38] block: mark AioContext as recursive
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL v3 03/38] block: mark AioContext as recursive |
Date: |
Tue, 13 Jan 2015 13:47:41 +0000 |
From: Paolo Bonzini <address@hidden>
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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
async.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/async.c b/async.c
index 3939b79..572f239 100644
--- a/async.c
+++ b/async.c
@@ -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);
--
2.1.0
- [Qemu-devel] [PULL v3 00/38] Block patches, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 02/38] qemu-iotests: Speed up make check-block, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 01/38] qemu-iotests: Remove 091 from quick group, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 05/38] block: replace g_new0 with g_new for bottom half allocation., Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 03/38] block: mark AioContext as recursive,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL v3 06/38] checkpatch: Brace handling on multi-line condition, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 04/38] block: do not allocate an iovec per read of a growable/zero_after_eof BDS, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 07/38] block: Get full backing filename from string, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 09/38] block: Relative backing file for image creation, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 10/38] block/vmdk: Relative backing file for creation, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 08/38] block: JSON filenames and relative backing files, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 13/38] block: fix spoiling all dirty bitmaps by mirror and migration, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 11/38] iotests: Add test for relative backing file names, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 14/38] qapi: Comment version info in TransactionAction, Stefan Hajnoczi, 2015/01/13
- [Qemu-devel] [PULL v3 12/38] qapi: Fix document for BlockStats.node-name, Stefan Hajnoczi, 2015/01/13