From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43089 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxK71-0003QM-Ro for qemu-devel@nongnu.org; Wed, 09 Mar 2011 09:11:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxK70-0006pb-2V for qemu-devel@nongnu.org; Wed, 09 Mar 2011 09:11:39 -0500 Received: from e38.co.us.ibm.com ([32.97.110.159]:55161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxK6z-0006p2-Ps for qemu-devel@nongnu.org; Wed, 09 Mar 2011 09:11:38 -0500 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by e38.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p296v1hn023507 for ; Tue, 8 Mar 2011 23:57:01 -0700 Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p29EBaWH096280 for ; Wed, 9 Mar 2011 07:11:36 -0700 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p29EGKDU020577 for ; Wed, 9 Mar 2011 07:16:20 -0700 Message-ID: <4D778A95.1000808@linux.vnet.ibm.com> Date: Wed, 09 Mar 2011 08:11:33 -0600 From: Michael Roth MIME-Version: 1.0 References: <1299528642-23631-1-git-send-email-mdroth@linux.vnet.ibm.com> <1299528642-23631-2-git-send-email-mdroth@linux.vnet.ibm.com> <4D778787.1020606@redhat.com> In-Reply-To: <4D778787.1020606@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: agl@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com, markus_mueller@de.ibm.com, qemu-devel@nongnu.org, abeekhof@redhat.com, aliguori@linux.vnet.ibm.com, Jes.Sorensen@redhat.com On 03/09/2011 07:58 AM, Paolo Bonzini wrote: > On 03/07/2011 09:10 PM, Michael Roth wrote: >> This allows us to implement an i/o loop outside of vl.c that can >> interact with objects that use qemu_set_fd_handler() > > I must say I really dislike the patches 1..3. It's _really_ getting the > QEMU NIH worse. While it is not really possible to get a new shiny > mainloop infrastructure in QEMU like snapping fingers (and I'm not sure > the glib mainloop will ever happen there), there is no reason not to > adopt glib's infrastructure in virtagent. While cooperation between QEMU > and virtagent is close, it is IMHO a substantially separate project that > can afford starting from a clean slate. > > If anybody disagrees, I'd be happy to hear their opinion anyway! > > I'm sorry I'm saying this only now and I've been ignoring this series > until v7. In the context of virtagent I would agree. The only complication there being that a large part of the event-driven code (the async read/write handlers for instance) is shared between virtagent and the host. Possibility this could be worked around with a set of wrappers..but it's hard to say. But more importantly, I wouldn't think of these changes as being specific to virtagent though. Currently we have a lot of qemu tools that stub out portions of the block code they pull in (qemu_set_fd_handler and whatnot). I think it might be beneficial to future tools/test utilities that they actually be able to drive things like aio and timer events. We just keep stubbing more and more things out in these cases, which I would argue is even worse because it can place artificial constraints on how code is written that happens to get used by such tools. > > Paolo