[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/2] vnc: threaded VNC server
From: |
Corentin Chary |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/2] vnc: threaded VNC server |
Date: |
Sun, 6 Jun 2010 16:48:53 +0200 |
On Sun, Jun 6, 2010 at 4:11 PM, Avi Kivity <address@hidden> wrote:
> 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?
Yep, but it's far better than waiting the lock because it doesn't slow
down the main thread.
I played big buck bunny trailler (33sec) in mplayer and tight encoding:
- ~40 sec with the non-threaded server
- ~37 sec with a lock
- ~33 sec with a try_lock
> A more elaborate approach would be to enqueue the refresh job into the
> queue. May need the iothread enabled so we have qemu_mutex.
Maybe, but I'd like to wait the generic async work subsystem before
adding different kind of jobs to the queue. And it's already a big
improvment over the current code :).
> btw, I could not find other uses of vd->mutex, shouldn't it protect against
> the work thread?
Check vnc-jobs.c, there is a qemu_mutex_lock(vs->vd->mutex);
--
Corentin Chary
http://xf.iksaif.net
Re: [Qemu-devel] [PATCH v2 2/2] vnc: threaded VNC server, Avi Kivity, 2010/06/06