From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34650 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLGZa-0003PH-Bw for qemu-devel@nongnu.org; Sun, 06 Jun 2010 10:11:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLGZZ-0004Qc-EB for qemu-devel@nongnu.org; Sun, 06 Jun 2010 10:11:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5366) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLGZZ-0004QQ-6L for qemu-devel@nongnu.org; Sun, 06 Jun 2010 10:11:33 -0400 Message-ID: <4C0BAC89.10804@redhat.com> Date: Sun, 06 Jun 2010 17:11:21 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2 2/2] vnc: threaded VNC server References: <1275657620-26226-1-git-send-email-corentincj@iksaif.net> <1275657620-26226-3-git-send-email-corentincj@iksaif.net> In-Reply-To: <1275657620-26226-3-git-send-email-corentincj@iksaif.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corentin Chary Cc: Anthony Liguori , Gautham R Shenoy , Qemu-development List , Alexander Graf On 06/04/2010 04:20 PM, Corentin Chary wrote: > > + if (vnc_trylock_display(vd)) { > + vd->timer_interval = VNC_REFRESH_INTERVAL_BASE; > + qemu_mod_timer(vd->timer, qemu_get_clock(rt_clock) + > + vd->timer_interval); > + return; > + } > + > has_dirty = vnc_refresh_server_surface(vd); > + vnc_unlock_display(vd); > This could delay the update by quite a bit, no? A more elaborate approach would be to enqueue the refresh job into the queue. May need the iothread enabled so we have qemu_mutex. btw, I could not find other uses of vd->mutex, shouldn't it protect against the work thread? -- error compiling committee.c: too many arguments to function