Il 14/03/2013 10:29, Stefan Hajnoczi ha scritto: > > Okay, I owe AioContext a deeper look then. > > We still have one level of nesting - the mainloop vs the AioContext > aio_pool().
That's a different thing, and it can be solved quite easily. As soon as each BDS will have its own AioContext, the synchronous operations. > We need to do something about mainloop vs AioContext. There should only > be one interface to add a file descriptor, today we have iohandler and > aio. Even better, the "other" handlers used by VFIO, VNC, etc should not use any global state. They should simply be yet another GSource or AioContext (depending on what's easier). Furthermore, each QEMUClock should be a separate timerfd (a timer queue on Windows; emulated using a thread on non-Linux POSIX systems), so that it can be easily added to an AioContext or wrapped by a GSource. Paolo