From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35996 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKXLa-0006Ru-Gg for qemu-devel@nongnu.org; Fri, 04 Jun 2010 09:54:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKXLJ-0007NG-AI for qemu-devel@nongnu.org; Fri, 04 Jun 2010 09:53:50 -0400 Received: from mail-fx0-f45.google.com ([209.85.161.45]:50993) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKXLJ-0007NB-4S for qemu-devel@nongnu.org; Fri, 04 Jun 2010 09:53:49 -0400 Received: by fxm17 with SMTP id 17so871251fxm.4 for ; Fri, 04 Jun 2010 06:53:48 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87B55367-1484-43AA-888F-9E62B061590D@suse.de> References: <1275657620-26226-1-git-send-email-corentincj@iksaif.net> <1275657620-26226-3-git-send-email-corentincj@iksaif.net> <87B55367-1484-43AA-888F-9E62B061590D@suse.de> Date: Fri, 4 Jun 2010 15:53:47 +0200 Message-ID: From: Corentin Chary Content-Type: text/plain; charset=ISO-8859-1 Subject: [Qemu-devel] Re: [PATCH v2 2/2] vnc: threaded VNC server List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Anthony Liguori , Qemu-development List , Gautham R Shenoy On Fri, Jun 4, 2010 at 3:25 PM, Alexander Graf wrote: > > On 04.06.2010, at 15:20, Corentin Chary wrote: > >> Implement a threaded VNC server using the producer-consumer model. >> The main thread will push encoding jobs (a list a rectangles to update) >> in a queue, and the VNC worker thread will consume that queue and send >> framebuffer updates to the output buffer. > > Hrm, does it merge the queue? So imagine the following gets put in the queue > > [0,0] - [100,100] > [100,0] - [200,10] > [0,0] - [200,10] > > Would that code try and merge those three queue entries? Because by adding the queue, you basically get rid of the automatic merging we get from the lazy dirty bitmap fetching. I wanted to add that later. > Before we were processing each entry and checked the bitmap again, seeing a merged bitmap of previous actions. With this I assume you push to-be-updated regions into the queue and mark them as processed before they are? I mark them as processed as soon as they are put into the queue. refresh() is also delayed while encoding job are processing (check the trylock part) to avoid unecessary dirty bitmap updates and locks. -- Corentin Chary http://xf.iksaif.net