From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MsLIy-0001Qh-4n for qemu-devel@nongnu.org; Mon, 28 Sep 2009 14:50:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MsLIv-0001QV-C0 for qemu-devel@nongnu.org; Mon, 28 Sep 2009 14:50:34 -0400 Received: from [199.232.76.173] (port=59066 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MsLIv-0001QB-7A for qemu-devel@nongnu.org; Mon, 28 Sep 2009 14:50:33 -0400 Received: from fe02x03-cgp.akado.ru ([77.232.31.165]:54200 helo=akado.ru) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MsLIu-0003jt-Lu for qemu-devel@nongnu.org; Mon, 28 Sep 2009 14:50:32 -0400 Date: Mon, 28 Sep 2009 22:50:32 +0400 (MSD) From: malc Subject: Re: [Qemu-devel] Main loop In-Reply-To: <20090928135723.GK29735@mothafucka.localdomain> Message-ID: References: <4ABEB6B3.4010102@codemonkey.ws> <4ABF7137.1040502@codemonkey.ws> <20090928135723.GK29735@mothafucka.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: qemu-devel@nongnu.org On Mon, 28 Sep 2009, Glauber Costa wrote: > > > Glauber spent some time with the IO thread recently. Any reason you didn't > > > start with the existing IO thread (besides the fact that it doesn't work with > > > TCG)? > > > > > > > Because i wasn't writing a replacement for IO Thread to begin with (btw it > > does work with TCG), what it doesn't do is play nicely with icount[1], > > work on Windows, and for mysterious reasons still requires alarm timers, > > it also deadlocks for me when killing QEMU windows while running smp > > guest, but that's easily corrected mistake somewhere i guess. > > You wasn't, but you ended up doing so, since it is unlikely that they > will both live in the end. I am still reading your patch, and I still > have to struggle a little bit to understand it. Can you please tell us > why do you think your approach is better? > > The current I/O thread currently works with both kvm and tcg. For KVM, I > am quite close (expecting to post patches today) that enables the > in-kernel irqchip for it, and pretty close to do smp. > > Note that I don't think it requires alarm timers at all, by design. So, > again, why should we drop what we have in favour of your implementation? Now that we have talked i see the problem and it basically boils down to this: kvm can(and does) run multiple vcpus in multiple threads, qemu always uses one, on top of this you are mainly interested in KVM and i'm _only_ interested in TCG. The way i see it the best approach would be to factor out main loop into separate file and let QEMU and KVM go their own separate ways w.r.t. this new entity. -- mailto:av1474@comtv.ru