History | View | Annotate | Download (9 kB)
aio / timers: Add aio_timer_init & aio_timer_new wrappers
Add aio_timer_init and aio_timer_new wrapper functions.
Signed-off-by: Alex Bligh <alex@alex.org.uk>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
aio / timers: Untangle include files
include/qemu/timer.h has no need to include main-loop.h anddoing so causes an issue for the next patch. Unfortunatelyvarious files assume including timers.h will pull in main-loop.h.Untangle this mess.
Signed-off-by: Alex Bligh <alex@alex.org.uk>...
aio / timers: Add QEMUTimerListGroup to AioContext
Add a QEMUTimerListGroup each AioContext (meaning a QEMUTimerListassociated with each clock is added) and delete it when theAioContext is freed.
aio: drop io_flush argument
The .io_flush() handler no longer exists and has no users. Drop theio_flush argument to aio_set_fd_handler() and related functions.
The AioFlushEventNotifierHandler and AioFlushHandler typedefs are nolonger used and are dropped too....
QEMUBH: make AioContext's bh re-entrant
BH will be used outside big lock, so introduce lock to protectbetween the writers, ie, bh's adders and deleter. The lock onlyaffects the writers and bh's callback does not take this extra lock.Note that for the same AioContext, aio_bh_poll() can not run in...
aio: add a ThreadPool instance to AioContext
This patch adds a ThreadPool to AioContext. It's possible that someAioContext instances will never use the ThreadPool, so defer creationuntil aio_get_thread_pool().
The reason why AioContext should have the ThreadPool is because the...
aio: convert aio_poll() to g_poll(3)
AioHandler already has a GPollFD so we can directly use itsevents/revents.
Add the int pollfds_idx field to AioContext so we can map g_poll(3)results back to AioHandlers.
Reuse aio_dispatch() to invoke handlers after g_poll(3)....
aio: Fix return value of aio_poll()
aio_poll() must return true if any work is still pending, even if itdidn't make progress, so that bdrv_drain_all() doesn't stop waiting tooearly. The possibility of stopping early occasionally lead to a failedassertion in bdrv_drain_all(), when some in-flight request was missed...
misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block: move include files to include/block/