From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG4rS-0006yh-KB for qemu-devel@nongnu.org; Thu, 14 Mar 2013 05:54:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UG4rL-0003Nv-NJ for qemu-devel@nongnu.org; Thu, 14 Mar 2013 05:54:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG4rL-0003Nl-DJ for qemu-devel@nongnu.org; Thu, 14 Mar 2013 05:54:03 -0400 Message-ID: <51419E33.6050401@redhat.com> Date: Thu, 14 Mar 2013 10:53:55 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1363154346-14827-1-git-send-email-qemulist@gmail.com> <51405BEA.6080109@redhat.com> <87hakfiild.fsf@codemonkey.ws> <5140A76E.1080902@redhat.com> <87vc8vrz6i.fsf@codemonkey.ws> <5140B8E0.8040302@redhat.com> <87fvzzb31w.fsf@codemonkey.ws> <20130314092942.GA9507@stefanha-thinkpad.redhat.com> In-Reply-To: <20130314092942.GA9507@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 0/2] port network layer onto glib List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: mdroth , "Michael S. Tsirkin" , Liu Ping Fan , Anthony Liguori , qemu-devel@nongnu.org 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