History | View | Annotate | Download (5 kB)
aio: Get rid of qemu_aio_flush()
There are no remaining users, and new users should probably beusing bdrv_drain_all() in the first place.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
aio: fix aio_ctx_prepare with idle bottom halves
Commit ed2aec4867f0d5f5de496bb765347b5d0cfe113d changed the returnvalue of aio_ctx_prepare from false to true when only idle bottomhalves are available. This broke PC old-style DMA, which uses them.Fix this by making aio_ctx_prepare return true only when non-idle...
aio: clean up now-unused functions
Some cleanups can now be made, now that the main loop does not anymore needhooks into the bottom half code.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
aio: introduce AioContext, move bottom halves there
Start introducing AioContext, which will let us remove globals fromaio.c/async.c, and introduce multiple I/O threads.
The bottom half functions now take an additional AioContext argument.A bottom half is created with a specific AioContext that remains the...
aio: add I/O handlers to the AioContext interface
With this patch, I/O handlers (including event notifier handlers) can beattached to a single AioContext.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
aio: add non-blocking variant of aio_wait
This will be used when polling the GSource attached to an AioContext.
aio: make AioContexts GSources
This lets AioContexts be used (optionally) with a glib main loop.
aio: add aio_notify
With this change async.c does not rely anymore on any service frommain-loop.c, i.e. it is completely self-contained.
async: Use bool for boolean struct members and remove a hole
Using bool reduces the size of the structure and improves readability.A hole in the structure was removed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
main_loop_wait: block indefinitely
- remove qemu_calculate_timeout;
- explicitly size timeout to uint32_t;
- introduce slirp_update_timeout;
- pass NULL as timeout argument to select in case timeout is the maximumvalue;
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
main-loop: create main-loop.h
async: Allow nested qemu_bh_poll calls
qemu may segfault when a BH handler first deletes a BH and then (possiblyindirectly) calls a nested qemu_bh_poll(). This is because the inner instancefrees the BH and deletes it from the list that the outer one processes....
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
async: Remove AsyncContext
The purpose of AsyncContexts was to protect qcow and qcow2 against reentrancyduring an emulated bdrv_read/write (which includes a qemu_aio_wait() call andcan run AIO callbacks of different requests if it weren't for AsyncContexts)....
Allow nested qemu_bh_poll() after BH deletion
Without this, qemu segfaults when a BH handler first deletes its BH andthen calls another function which involves a nested qemu_bh_poll() call.
This can be reproduced by generating an I/O error (e.g. with blkdebug) on...
Split out bottom halves
Instead of putting more and more stuff into vl.c, let's have the genericfunctions that deal with asynchronous callbacks in their own file.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Introduce contexts for asynchronous callbacks
Add the possibility to use AIO and BHs without allowing foreign callbacks to berun. Basically, you put your own AIOs and BHs in a separate context. Fordetails see the comments in the source.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...