From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzSTw-0000zz-Hk for qemu-devel@nongnu.org; Mon, 20 Feb 2012 07:36:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzSTq-0004DQ-00 for qemu-devel@nongnu.org; Mon, 20 Feb 2012 07:36:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzSTp-0004DK-OZ for qemu-devel@nongnu.org; Mon, 20 Feb 2012 07:36:33 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1KCaXLm024994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 20 Feb 2012 07:36:33 -0500 Date: Mon, 20 Feb 2012 14:36:28 +0200 From: Alon Levy Message-ID: <20120220123628.GF23926@garlic.redhat.com> References: <1329686886-6853-1-git-send-email-alevy@redhat.com> <1329686886-6853-6-git-send-email-alevy@redhat.com> <4F422F5C.9060202@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F422F5C.9060202@redhat.com> Subject: Re: [Qemu-devel] [RFC 5/7] qxl-render: call ppm_save on callback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, elmarco@redhat.com, Luiz Capitulino On Mon, Feb 20, 2012 at 12:32:44PM +0100, Gerd Hoffmann wrote: > On 02/19/12 22:28, Alon Levy wrote: > > This changes the behavior of the monitor command. After the previous > > patch, there is no longer an option of deadlock with virt-manager, but > > ppm_save is called too early, before the update has completed. With this > > patch it is called at the correct moment, but that means there is a race > > between the monitor command completing and the screendump file being saved. > > > > The only solution is to use an asynchronous monitor command. For a > > previous round of this see: > > http://lists.gnu.org/archive/html/qemu-devel/2011-10/msg02810.html > > > > Since that's contentious, I'm suggesting we do something that is almost > > correct and doesn't hang, instead of correct and hangs. The screendump > > user can inotify on the directory and the file if need be. For casual > > monitor usage there is no difference. > > Hmm, that is pretty lame. There are users like autotest which expect > the screen dump being there when the monitor command is finished, that > change will break them. > > Unfortunaly there is no easy way out. I think the options are: > > (1) Keep existing behavior. That means the screenshot might show old > screen content. Not very nice too. Would work sort-of ok for > autotest though as autotest does screenshots every second and thus > the screen content wouldn't be older than a second. > > (2) Async monitor command. Keeps interface and works nicely. A bunch > of QAPI bits tickled into master meanwhile, so we could look at > this again. Luiz? What is the status here? > > (3) Something like this patch + additionally introduce a > "your-screenshot-is-finished-now" qmp event. Will break existing > users too. But at least they can be adapted without requiring > some external, nonportable service like inotify ... > I was going to look for QAPI bits after this series (i.e. (2)). Doing (3) is also possible. > cheers, > Gerd >