From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4dqV-0004IR-Qp for qemu-devel@nongnu.org; Mon, 05 Mar 2012 14:45:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4dqQ-0008JX-Q5 for qemu-devel@nongnu.org; Mon, 05 Mar 2012 14:45:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4dqQ-0008JF-Hp for qemu-devel@nongnu.org; Mon, 05 Mar 2012 14:45:18 -0500 Date: Mon, 5 Mar 2012 16:45:17 -0300 From: Luiz Capitulino Message-ID: <20120305164517.4aace404@doriath.home> In-Reply-To: <20120305185808.GE20937@garlic.tlv.redhat.com> References: <1330956981-5001-1-git-send-email-alevy@redhat.com> <4F54CEA2.10808@codemonkey.ws> <4F54F5F8.70105@redhat.com> <4F54F76B.70403@codemonkey.ws> <20120305143142.1a1a53e2@doriath.home> <20120305180958.GC20937@garlic.tlv.redhat.com> <4F550350.7030703@redhat.com> <20120305185808.GE20937@garlic.tlv.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/2] console: add hw_screen_dump_async List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: kraxel@redhat.com, Avi Kivity , Anthony Liguori , qemu-devel@nongnu.org On Mon, 5 Mar 2012 20:58:08 +0200 Alon Levy wrote: > On Mon, Mar 05, 2012 at 08:17:52PM +0200, Avi Kivity wrote: > > On 03/05/2012 08:09 PM, Alon Levy wrote: > > > On Mon, Mar 05, 2012 at 02:31:42PM -0300, Luiz Capitulino wrote: > > > > On Mon, 05 Mar 2012 11:27:07 -0600 > > > > Anthony Liguori wrote: > > > > > > > > > On 03/05/2012 11:20 AM, Avi Kivity wrote: > > > > > > On 03/05/2012 04:33 PM, Anthony Liguori wrote: > > > > > >> > > > > > >> > > > > > >> async in QEMU doesn't mean "generate a QMP event when you're done". > > > > > >> It should mean execute this closure when you finish (function pointer > > > > > >> + opaque). > > > > > >> > > > > > >> The QMP event should be dispatched from the closure such that the > > > > > >> screendump code doesn't have to have a direct dependency on QMP. > > > > > >> > > > > > > > > > > > > What about using the parallel execution facility of qmp? It's silly to > > > > > > duplicate every command X with X-async and X-COMPLETED. > > > > > > How would the parallel execution facility be opaque to the implementer? > > > screendump returns, screendump_async needs to pass a closure. You can > > > automatically generate any amount of code, but you can only have a > > > single function implementation with longjmp/coroutine, or having a > > > saparate thread per command but that would mean taking locks for > > > anything not trivial, which avoids the no-change-to-implementation. Is > > > this what you have in mind? > > > > It would not be opaque to the implementer. But it would avoid > > introducing new commands and events, instead we have a unified mechanism > > to signal completion. > > Yeah, that sounds good. Let's have that for 6.4. That's too far away, qemu will have be re-written a dozen of times when we get there. But if you meant 1.2, yes, I hope to have async support for 1.2. But I must admit that I'm having some trouble delivering things on time...