From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs8mu-0003BL-Hh for qemu-devel@nongnu.org; Fri, 30 Oct 2015 08:28:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zs8mq-0007QH-Qo for qemu-devel@nongnu.org; Fri, 30 Oct 2015 08:28:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs8mq-0007Pk-MD for qemu-devel@nongnu.org; Fri, 30 Oct 2015 08:28:04 -0400 Date: Fri, 30 Oct 2015 21:27:55 +0900 From: "Daniel P. Berrange" Message-ID: <20151030122755.GP20961@redhat.com> References: <1446203414-4013-1-git-send-email-kraxel@redhat.com> <1446203414-4013-17-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1446203414-4013-17-git-send-email-kraxel@redhat.com> Subject: Re: [Qemu-devel] [PATCH 16/19] vnc: recycle empty vs->output buffer Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: pl@kamp.de, qemu-devel@nongnu.org On Fri, Oct 30, 2015 at 12:10:11PM +0100, Gerd Hoffmann wrote: > From: Peter Lieven > > If the vs->output buffer is empty it will be dropped > by the next qio_buffer_move_empty in vnc_jobs_consume_buffer > anyway. So reuse the allocated buffer from this buffer > in the worker thread where we otherwise would start with > an empty (unallocated buffer). > > Signed-off-by: Peter Lieven > > [ added a comment describing the non-obvious optimization ] > > Signed-off-by: Gerd Hoffmann > --- > ui/vnc-jobs.c | 8 ++++++++ > 1 file changed, 8 insertions(+) Reviewed-by: Daniel P. Berrange Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|