Re: [Qemu-devel] [PATCH 01/17] aio: introduce aio_co_schedule and aio_co_wake

2017-01-30 Thread Paolo Bonzini
On 30/01/2017 10:18, Stefan Hajnoczi wrote: > On Fri, Jan 20, 2017 at 05:43:06PM +0100, Paolo Bonzini wrote: >> diff --git a/include/qemu/coroutine_int.h b/include/qemu/coroutine_int.h >> index 14d4f1d..1efa356 100644 >> --- a/include/qemu/coroutine_int.h >> +++ b/include/qemu/coroutine_int.h >>

Re: [Qemu-devel] [PATCH 01/17] aio: introduce aio_co_schedule and aio_co_wake

2017-01-30 Thread Stefan Hajnoczi
On Fri, Jan 20, 2017 at 05:43:06PM +0100, Paolo Bonzini wrote: > diff --git a/include/qemu/coroutine_int.h b/include/qemu/coroutine_int.h > index 14d4f1d..1efa356 100644 > --- a/include/qemu/coroutine_int.h > +++ b/include/qemu/coroutine_int.h > @@ -40,12 +40,20 @@ struct Coroutine { > Corouti

[Qemu-devel] [PATCH 01/17] aio: introduce aio_co_schedule and aio_co_wake

2017-01-20 Thread Paolo Bonzini
aio_co_wake provides the infrastructure to start a coroutine on a "home" AioContext. It will be used by CoMutex and CoQueue, so that coroutines don't jump from one context to another when they go to sleep on a mutex or waitqueue. However, it can also be used as a more efficient alternative to one