From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7o18-00008h-4y for qemu-devel@nongnu.org; Wed, 14 Mar 2012 09:13:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7o11-0002Fk-Rl for qemu-devel@nongnu.org; Wed, 14 Mar 2012 09:13:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7o11-0002FO-JR for qemu-devel@nongnu.org; Wed, 14 Mar 2012 09:13:19 -0400 Date: Wed, 14 Mar 2012 10:13:19 -0300 From: Luiz Capitulino Message-ID: <20120314101319.1a617a74@doriath.home> In-Reply-To: References: <00c1eea5-ccb2-4b54-89f8-bdbf00fdc8a4@zmail17.collab.prod.int.phx2.redhat.com> <4F5F48F9.7090501@redhat.com> <4F606A09.2080906@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH/RFC 0/7] Screendump to UNIX socket & in PNG format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, =?ISO-8859-1?B?TWFyYy1BbmRy6Q==?= Lureau , =?ISO-8859-1?B?TWFyYy1BbmRy6Q==?= Lureau , Gerd Hoffmann , =?ISO-8859-1?B?TWFyYy1BbmRy6Q==?= Lureau On Wed, 14 Mar 2012 10:01:15 +0000 Stefan Hajnoczi wrote: > On Wed, Mar 14, 2012 at 9:51 AM, Gerd Hoffmann wrote: > > =A0Hi, > > > >> The most practical first step would be simply sending the ppm over a > >> socket from ppm_save(). =A0The 'screendump' command today already bloc= ks > >> so no new badness is being added. =A0There would be no threads or fancy > >> image encoding. > > > > Adding scaling / compression support will add more overhead though, so > > doing that without offloading screendump to a thread first is a bad idea > > I think. =A0Or at least have some numbers to see how bad it actually is. >=20 > I agree, that's why I suggest sending the ppm over a socket. It > transports out the image data and QEMU itself doesn't do the > encoding/scaling. Just out of curiosity, are we planning to extend the current screendump command or add a new one? If we just extend the current command, then we'll have to make the "filename" parameter optional. But this is a compatible change, I think. Also, when returning the image via fd, we could offload its writing to a bh. This would give us a poor man's async support, where the biggest drawback would the lack of error detection (can this operation fail anyway?= ).