[Spice-devel] [PATCH spice] RFC: remove guest side video time-stamping

Christophe Fergeau cfergeau at redhat.com
Tue Nov 4 06:56:27 PST 2014


Hey,

On Sun, Nov 02, 2014 at 10:24:13PM +0100, Marc-André Lureau wrote:
> The multimedia time is defined by the server side monotonic time [1],
> but the drawing time-stamp is done in guest side, so it requires
> synchronization between host and guest. This is expensive, when no audio
> is playing, there is a ~30x/sec wakeup to update the qxl device mmtime,
> and it requires marking dirty the rom region.

I guess this could be used somehow to detect when images are taking a
long time to get drawn in the guest, but doing things the way they
currently are does not seem to be useful indeed.

> 
> Instead, the video timestamping can be done more efficiently on server
> side, without visible drawbacks.

I think this could go a step further, and mm_time could be set as below rather than
in process_commands. Maybe RedDrawable::mm_time could even be removed.

diff --git a/server/red_worker.c b/server/red_worker.c
index 8b4edd0..695db5e 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -8477,10 +8477,7 @@ static inline int red_marshall_stream_data(RedChannelClient *rcc,
         }
     }
 
-    /* workaround for vga streams */
-    frame_mm_time =  drawable->red_drawable->mm_time ?
-                        drawable->red_drawable->mm_time :
-                        reds_get_mm_time();
+    frame_mm_time = reds_get_mm_time();
     outbuf_size = dcc->send_data.stream_outbuf_size;
     ret = mjpeg_encoder_start_frame(agent->mjpeg_encoder, image->u.bitmap.format,
                                     width, height,

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141104/e0ec4354/attachment-0001.sig>


More information about the Spice-devel mailing list