On 01/12/2012 11:58 AM, Stefan Hajnoczi wrote: > This is something I'm looking at right now and will probably want to > discuss with Paolo. > > In a coroutine we're probably using a main loop and timers should be > available there. In general, the problem we're starting to see is > that some block layer features are using timers (I/O throttling, QED > deferred dirty bit clearing, image streaming). The question is do we > isolate this functionality so it is unavailable from a qemu-tool world > when there's no main loop, or do we move everything into a main loop? Yes, I would move things into a main loop just like qemu-nbd does. I even had some prototype patches for it. The qemu-img part is broken because it uses callbacks that haven't been made asynchronous yet; the one for qemu-io should be okay modulo some more testing. Paolo