History | View | Annotate | Download (3 kB)
coroutine: add ./configure --disable-coroutine-pool
The 'gthread' coroutine backend was written before the freelist (akapool) existed in qemu-coroutine.c.
This means that every thread is expected to exit when its coroutineterminates. It is not possible to reuse threads from a pool....
coroutine: protect global pool with a mutex
The coroutine freelist is a global pool of unused coroutines. It avoidsthe setup/teardown overhead associated with the coroutine lifecycle.Since the pool is global, we need to synchronize access so thatcoroutines can be used outside the BQL....
coroutine: stop using AioContext in CoQueue
qemu_co_queue_next(&queue) arranges that the next queued coroutine isrun at a later point in time. This deferred restart is useful becausethe caller may not want to transfer control yet.
This behavior was implemented using QEMUBH in the past, which meant that...
coroutine: move pooling to common code
The coroutine pool code is duplicated between the ucontext andsigaltstack backends, and absent from the win32 backend. But thecode can be shared easily by moving it to qemu-coroutine.c.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
block: move include files to include/block/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
coroutine: introduce coroutines
Asynchronous code is becoming very complex. At the same timesynchronous code is growing because it is convenient to write.Sometimes duplicate code paths are even added, one synchronous and theother asynchronous. This patch introduces coroutines which allow code...