From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35581 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfCPK-0004d6-OO for qemu-devel@nongnu.org; Tue, 18 Jan 2011 09:19:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfCPJ-0006qY-Am for qemu-devel@nongnu.org; Tue, 18 Jan 2011 09:19:38 -0500 Received: from mail-qy0-f173.google.com ([209.85.216.173]:60896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfCPJ-0006qR-73 for qemu-devel@nongnu.org; Tue, 18 Jan 2011 09:19:37 -0500 Received: by qyl38 with SMTP id 38so2876780qyl.4 for ; Tue, 18 Jan 2011 06:19:36 -0800 (PST) Message-ID: <4D35A176.3010405@codemonkey.ws> Date: Tue, 18 Jan 2011 08:19:34 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <4D2F4FC2.1060408@codemonkey.ws> <20110117101806.GA14607@amit-x200.redhat.com> <4D3458CC.1070004@codemonkey.ws> <20110118115624.GD10526@amit-x200.redhat.com> In-Reply-To: <20110118115624.GD10526@amit-x200.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2 0/5] iohandlers: Add support for enabling/disabling individual handlers List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: Paul Brook , qemu list , Gerd Hoffmann On 01/18/2011 05:56 AM, Amit Shah wrote: > On (Mon) Jan 17 2011 [08:57:16], Anthony Liguori wrote: > >>> Also -- this patchset was prompted by a bug in qemu chardevs that >>> freezes guests if they write faster than the chardevs can consume. >>> What should the strategy on fixing that bug be? >>> >> Fix the loop API such that we're not just fixing one bug but that we >> can address a bunch of other bugs that are out there. >> > But what's the right fix? > > * Pull in glib or some other library > * Mimic API from some other library > 1) get rid of poll callbacks These kill us right now because it makes it impossible to use poll/epoll or to use some other API. 2) switch to a single callback and an event mask We can't do this without (1) because the can_read callback takes a different signature. But read/write callbacks can be a single callback (but it needs to be changed to accept an event mask). 3) allow the event mask to be changed via a new API This gives the functionality you're looking for while making a huge improvement to the internal API. A quick python/perl script can probably do 90% of the work here. Regards, Anthony Liguori > Amit >