On Thu, Jun 15, 2017 at 12:23:27PM +0800, Jason Wang wrote: > Paolo, Marc and Stefan: > > We want let chardev front-end run in colo comparing IOThread. This looks not > supported by current chardev frontend API. Any idea/suggestion on how to > achieve this?
I'm not very familiar with chardev but a quick look suggests that the subsystem uses the glib event loop (GMainContext) APIs. IOThread uses QEMU's AioContext event loop and does not run a GMainContext. main-loop.c has an AioContext but also a GMainContext. It runs the GMainContext event loop and integrates AioContext into that event loop. Today chardev and IOThread cannot work together. chardev only works in the main loop because the implicit NULL GMainContext is used by the code. It may be possible to unify main-loop.c and AioContext so that every AioContext also has a GMainContext. I don't know how difficult that will be. Unification must not decrease AioContext performance. Benchmarks would be necessary. Stefan
signature.asc
Description: PGP signature