mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
aio: push aio_context_acquire/release down to dispatching
The AioContext data structures are now protected by list_lock and/or they are walked with FOREACH_RCU primitives. There is no need anymore to acquire the AioContext for the entire duration of aio_dispatch. Instead, just acquire it before and after invoking the callbacks. The next step is then to push it further down. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170213135235.12274-12-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
b20123a28b
commit
0836c72f70
3 changed files with 20 additions and 22 deletions
|
@ -114,7 +114,9 @@ int aio_bh_poll(AioContext *ctx)
|
|||
ret = 1;
|
||||
}
|
||||
bh->idle = 0;
|
||||
aio_context_acquire(ctx);
|
||||
aio_bh_call(bh);
|
||||
aio_context_release(ctx);
|
||||
}
|
||||
if (bh->deleted) {
|
||||
deleted = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue