History | View | Annotate | Download (9.9 kB)
threadpool: move globals into struct ThreadPool
Move global variables into a struct so multiple thread pools can besupported in the future.
This patch does not change thread-pool.h interfaces. There is still aglobal thread pool and it is not yet possible to create/destroy...
threadpool: add thread_pool_new() and thread_pool_free()
ThreadPool is tied to an AioContext through its event notifier, whichdictates in which AioContext the work item's callback function will beinvoked.
In order to support multiple AioContexts we need to support multiple...
misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block: move include files to include/block/
aio: rename AIOPool to AIOCBInfo
Now that AIOPool no longer keeps a freelist, it isn't really a "pool" anymore. Rename it to AIOCBInfo and make it const since it no longerneeds to be modified.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
threadpool: do not take lock in event_notifier_ready
The ordering is:
worker thread consumer thread ------------------------------------------------------------------- write ret event_notifier_test_and_clear...
aio: add generic thread-pool facility
Add a generic thread-pool. The code is roughly based on posix-aio-compat.c,with some changes, especially the following:
- use QemuSemaphore instead of QemuCond;
- separate the state of the thread from the return code of the worker...