From a0710f7995f914e3044e5899bd8ff6c43c62f916 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 20 Feb 2015 17:26:52 +0100 Subject: iothread: release iothread around aio_poll This is the first step towards having fine-grained critical sections in dataplane threads, which resolves lock ordering problems between address_space_* functions (which need the BQL when doing MMIO, even after we complete RCU-based dispatch) and the AioContext. Because AioContext does not use contention callbacks anymore, the unit test has to be changed. Signed-off-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Message-id: 1424449612-18215-4-git-send-email-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- async.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'async.c') diff --git a/async.c b/async.c index 77d080d..46d9e63 100644 --- a/async.c +++ b/async.c @@ -280,12 +280,6 @@ static void aio_timerlist_notify(void *opaque) aio_notify(opaque); } -static void aio_rfifolock_cb(void *opaque) -{ - /* Kick owner thread in case they are blocked in aio_poll() */ - aio_notify(opaque); -} - AioContext *aio_context_new(Error **errp) { int ret; @@ -303,7 +297,7 @@ AioContext *aio_context_new(Error **errp) event_notifier_test_and_clear); ctx->thread_pool = NULL; qemu_mutex_init(&ctx->bh_lock); - rfifolock_init(&ctx->lock, aio_rfifolock_cb, ctx); + rfifolock_init(&ctx->lock, NULL, NULL); timerlistgroup_init(&ctx->tlg, aio_timerlist_notify, ctx); return ctx; -- cgit v1.1