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

Marc-André Lureau mlureau at redhat.com
Tue Nov 4 07:00:06 PST 2014



----- Original Message -----
> 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.

I think it would be wrong to rely on the server/QXL timestamp to do this, there is probably a better clock for that.

> > 
> > 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.

Marshalling time is when the command is actually sent to client, not the time it is "drawn" by guest.

So we can't remove RedDrawable::mm_time either.

> 
> 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
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list