Re: [Spice-devel] [spice-gtk PATCH 1/7] channel-base: remove bad check of SpiceMsgWaitForChannels validity

2012-08-21 Thread Yonit Halperin
Hi, On 08/21/2012 02:17 PM, Marc-André Lureau wrote: On Wed, Aug 15, 2012 at 9:56 AM, Yonit Halperin wrote: SpiceMsgWaitForChannels is not packed. Comparing the original msg size to SpiceMsgWaitForChannels is wrong. --- gtk/channel-base.c |3 --- 1 files changed, 0 insertions(+), 3

Re: [Spice-devel] [spice-gtk PATCH 5/7] seamless migration: transfer pending msgs to the destination, instead of sending them to the src before FLUSH_MARK

2012-08-22 Thread Yonit Halperin
On 08/21/2012 02:24 PM, Marc-André Lureau wrote: On Wed, Aug 15, 2012 at 9:56 AM, Yonit Halperin wrote: message. All the other pending msgs will be sent later to the destination server (see next patch). If it breaks current semi-seamless or older migration methods, it would be better to

[Spice-devel] [spice-gtk PATCH v2 0/8] seamless-migration: spice-gtk v2

2012-08-25 Thread Yonit Halperin
ry private session members instead of session properties. copy enable-usbredir flag to the migration session new:don't attach migration temporary spice channel to smartcard devices. Yonit Halperin (8): channel-base: remove bad check of SpiceMsgWaitForChannels validity chann

[Spice-devel] [spice-gtk PATCH v2 1/8] channel-base: remove bad check of SpiceMsgWaitForChannels validity

2012-08-25 Thread Yonit Halperin
SpiceMsgWaitForChannels is not packed. Comparing the original msg size to SpiceMsgWaitForChannels is wrong. --- gtk/channel-base.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/gtk/channel-base.c b/gtk/channel-base.c index cc4d242..2968f42 100644 --- a/gtk/channel-base

[Spice-devel] [spice-gtk PATCH v2 2/8] channel_main: handle SPICE_MSG_AGENT_CONNECTED_TOKENS

2012-08-25 Thread Yonit Halperin
--- gtk/channel-main.c | 12 spice-common |2 +- 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/gtk/channel-main.c b/gtk/channel-main.c index 0c15dfa..91c9167 100644 --- a/gtk/channel-main.c +++ b/gtk/channel-main.c @@ -163,6 +163,7 @@ static void spice_m

[Spice-devel] [spice-gtk PATCH v2 3/8] seamless-migration: update spice-common submodule

2012-08-25 Thread Yonit Halperin
Update channel-main as well to support the change made to SpiceMsgMainMigrationBegin: it now holds all the destination fields inside SpiceMigrationDstInfo. --- gtk/channel-main.c |6 +++--- spice-common |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/channel

[Spice-devel] [spice-gtk PATCH v2 4/8] seamless migration: src and dest servers handshake

2012-08-25 Thread Yonit Halperin
Flow: (1) *src* main channel coroutine (main_handle_migrate_begin_seamless): handles SPICE_MSG_MAIN_MIGRATE_BEGIN_SEAMLESS; yields to the main loop, supplying it the destination information needed for connection. (2) main context (migrate_connect): Establishes a new session for connecti

[Spice-devel] [spice-gtk PATCH v2 5/8] seamless migration: transfer pending msgs to the destination, instead of sending them to the src before FLUSH_MARK

2012-08-25 Thread Yonit Halperin
In order to save migration time, and probably also decrease migration data size, we push the flush mark to the src server before any other message. All the other pending msgs will be sent later to the destination server (see next patch). --- gtk/channel-base.c | 12 1 files changed,

[Spice-devel] [spice-gtk PATCH v2 6/8] seamless migration: don't reset messages data when swapping channels

2012-08-25 Thread Yonit Halperin
When swapping the src and dest channels's, we need to keep the xmit_queue and msg serials. Their state is expected to stay the same after migration. --- gtk/channel-main.c |4 +++- gtk/spice-channel-priv.h |2 +- gtk/spice-channel.c | 12 +++- gtk/spice-session-priv.h

[Spice-devel] [spice-gtk PATCH v2 7/8] migration: copy enable-smartcard/audio/usbredir state to the migrated session

2012-08-25 Thread Yonit Halperin
Otherwise, we will not create smartcard/usb channel on the destination side, and we will create audio channels, no matter if they existed of didn't exist for the src side. --- gtk/spice-channel.c | 12 +++- gtk/spice-session.c |3 +++ gtk/usb-device-manager.c |4 +--- 3

[Spice-devel] [spice-gtk PATCH v2 8/8] channel-smartcard: do not attach temporary migration channel to smartcard

2012-08-25 Thread Yonit Halperin
During migration, the smartcard channel that belongs to the temporary copied session shouldn't be active. --- gtk/channel-main.c |1 + gtk/channel-smartcard.c | 55 ++ gtk/spice-session-priv.h |1 + 3 files changed, 38 insertions(+), 19

[Spice-devel] [PATCH] snd channel: fix accessing freed memory

2012-10-11 Thread Yonit Halperin
snd_channel_put freed "channel", and then channel->worker was accessed. It caused segmentation faults during connections and disconnections of the client. --- server/snd_worker.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/snd_worker.c b/server/snd_worker.c

Re: [Spice-devel] [PATCH] snd channel: fix accessing freed memory

2012-10-12 Thread Yonit Halperin
On 10/11/2012 08:58 PM, Marc-André Lureau wrote: - Mensaje original - snd_channel_put freed "channel", and then channel->worker was accessed. do you mean "channel->worker" is freed instead, (since other channel member are accessed)? I meant that "channel" is freed, and then there i

[Spice-devel] [spice-server PATCH 1/2] display seamless migration: don't process both cmd ring and dispatcher queue till migration data is received

2012-11-05 Thread Yonit Halperin
fix: rhbz#866929 At migration destination side, we need to restore the client's surfaces state, before sending surfaces related messages. Before this patch, we stopped the processing of only the cmd ring, till migration data arrived. However, some QXL_IOs require reading and rendering the cmd rin

[Spice-devel] [spice-server PATCH 2/2] display seamless migration: no need to trace the generation of the primary surface

2012-11-05 Thread Yonit Halperin
We no longer process destroy_primary or destroy_surfaces while waiting for migration data. --- server/red_worker.c | 51 --- 1 files changed, 16 insertions(+), 35 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index dd27872..4

[Spice-devel] [spice-server PATCH] red_worker.c: fix calling set_client_capabilities when it is unsupported by qemu

2012-11-06 Thread Yonit Halperin
The erroneous call was in handle_dev_start. This patch also fixes not calling set_client_capabilities when the qxl major_version is > 3. --- server/red_worker.c | 18 -- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c inde

Re: [Spice-devel] [spice-server PATCH 1/2] display seamless migration: don't process both cmd ring and dispatcher queue till migration data is received

2012-11-07 Thread Yonit Halperin
Hi, On 11/07/2012 10:25 AM, Uri Lublin wrote: On 11/05/2012 11:33 PM, Yonit Halperin wrote: fix: rhbz#866929 At migration destination side, we need to restore the client's surfaces state, before sending surfaces related messages. Before this patch, we stopped the processing of only th

[Spice-devel] [PATCH spice-server 0/7] please ignore previous partial series

2012-11-21 Thread Yonit Halperin
Hi, This series of patches includes fixes that are mostly related to migration. Regards, Yonit. Yonit Halperin (7): char_device.c: add ref count for write-to-device buffers char_device.c: when the state is destroyed, also free the buffer that is being written to the device reds.c: fix

[Spice-devel] [PATCH spice-server 1/7] char_device.c: add ref count for write-to-device buffers

2012-11-21 Thread Yonit Halperin
The ref count is used in order to keep buffers that were in the write queue and now are part of migration data, in case the char_device state is destroyed before we complete sending the migration data. --- server/char_device.c | 51 +-- server/char_d

[Spice-devel] [PATCH spice-server 2/7] char_device.c: when the state is destroyed, also free the buffer that is being written to the device

2012-11-21 Thread Yonit Halperin
--- server/char_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/char_device.c b/server/char_device.c index 1c48719..5231bf0 100644 --- a/server/char_device.c +++ b/server/char_device.c @@ -688,6 +688,9 @@ void spice_char_device_state_destroy(SpiceCharDeviceState *char_dev)

[Spice-devel] [PATCH spice-server 4/7] red_worker.c: fix marshalling of migration data

2012-11-21 Thread Yonit Halperin
fix calling spice_marhsaller_add_ref with memory on stack --- server/red_worker.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 18ac949..092d45c 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -8433,7 +

[Spice-devel] [PATCH spice-server 5/7] smartcard.c: avoid marshalling migration data with reference to a memory that might be released before send has completed

2012-11-21 Thread Yonit Halperin
The current solution just copy the buffer. Currently data that is read from the guest is always copied before sending it to the client. When we will have ref count for these buffers, we can also use it for marshalling the migration data. --- server/smartcard.c | 2 +- 1 file changed, 1 insertion(+

[Spice-devel] [PATCH spice-server 6/7] red_worker.c: fix not sending all pending messages when the device is stopped

2012-11-21 Thread Yonit Halperin
red_wait_outgoing_item only waits till the currently outgoing msg is completely sent. red_wait_outgoing_items does the same for multi-clients. handle_dev_stop erroneously called red_wait_outgoing_items, instead of waiting till all the items in the pipes are sent. This waiting is necessary because

[Spice-devel] [PATCH spice-server 7/7] red_worker.c: fix memory corruption when data from client is bigger than 1024 bytes

2012-11-21 Thread Yonit Halperin
Previously, there was no check for the size of the message received from the client, and all messages were read into a buffer of size 1024. However, migration data can be bigger than 1024. In such cases, memory corruption occurred. --- server/red_worker.c | 12 1 file changed, 12 inse

[Spice-devel] [PATCH] char_device.c: fix call to spice_marshaller_add_ref with memory on stack

2012-11-21 Thread Yonit Halperin
rhbz#862352 --- server/char_device.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/server/char_device.c b/server/char_device.c index ac2632d..141ec88 100644 --- a/server/char_device.c +++ b/server/char_device.c @@ -816,12 +816,14 @@ void spice_char_device_wakeu

[Spice-devel] [PATCH spice-server 3/7] reds.c: fix calls to spice_marshaller_add_ref with ptr to memory that might be released before sending

2012-11-21 Thread Yonit Halperin
--- server/reds.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/server/reds.c b/server/reds.c index 98c8706..b99d01f 100644 --- a/server/reds.c +++ b/server/reds.c @@ -1171,16 +1171,20 @@ void reds_marshall_migrate_data(SpiceMarshaller *m) spic

Re: [Spice-devel] [PATCH spice-server 1/7] char_device.c: add ref count for write-to-device buffers

2012-11-26 Thread Yonit Halperin
On 11/22/2012 04:58 AM, Hans de Goede wrote: Hi, Looks good, one minor comment though, see my remarks inline. I'll fix it. Thanks for the review. On 11/21/2012 08:42 PM, Yonit Halperin wrote: The ref count is used in order to keep buffers that were in the write queue and now are pa

[Spice-devel] [PATCH spice-server 1/2] red_worker: fix sending internal images with stride > bpp*width to lz compression

2012-11-28 Thread Yonit Halperin
rhbz#876685 The current lz implementation does not support such bitmaps. The following patch will actually prevent allocating stride > bpp*width for internal images. --- server/red_worker.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/server/red

[Spice-devel] [PATCH spice-server 2/2] red_worker: no need to align the stride of internal images

2012-11-28 Thread Yonit Halperin
--- server/red_worker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red_worker.c b/server/red_worker.c index 9bab003..8f7f45a 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -5065,7 +5065,7 @@ static ImageItem *red_add_surface_area_image(DisplayChannel

Re: [Spice-devel] [PATCH spice-server 2/2] red_worker: no need to align the stride of internal images

2012-11-28 Thread Yonit Halperin
On 11/28/2012 05:54 PM, Alon Levy wrote: Why is there no need to align the stride of internal images? what happens if we keep this alignment? Please add the answers to the patch log message. Why do you think there may be a need? those images are just read from the surface, compressed, and sent

[Spice-devel] [PATCH spice-server] agent: fix mishandling of agent data received from the client after agent disconnection

2012-11-30 Thread Yonit Halperin
The server can receive from the client agent data even when the agent is disconnected. This can happen if the client sends the agent data before it receives the AGENT_DISCONNECTED msg. We should receive and handle such msgs, instead of disconnecting the client. This bug can also lead to a server c

[Spice-devel] [PATCH spice-server] red_worker: revert 8855438a

2012-12-05 Thread Yonit Halperin
red_proccess_commands calls were added after calling guest_set_client_capabilities in order to cleanup the command ring from old commands that the client might not be able to handle. However, calling red_process_commands at this stage does send messages to the client. In addition, since setting the

[Spice-devel] [PATCH] red_parse_qxl: fix throwing away drawables that have masks

2012-12-12 Thread Yonit Halperin
Non rgb bitmaps are allowed to not have a palette in case they are masks (which are 1BIT bitmaps). Related: rhbz#864982 --- server/red_parse_qxl.c | 27 +-- server/red_worker.c|8 +++- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/server/re

Re: [Spice-devel] [PATCH] red_parse_qxl: fix throwing away drawables that have masks

2012-12-13 Thread Yonit Halperin
On 12/13/2012 06:42 AM, Alon Levy wrote: All looks good except the assert. We should be removing them whenever they are guest trigerable - maybe I'm not following the code, but if in red_get_image sees no pallete in the qxl struct then palette will be NULL, which means it's guest trigerable.

[Spice-devel] [spice-server PATCH 1/2] red_worker.c: insert a drawable to its position in the current tree before calling red_detach_streams_behind

2013-01-08 Thread Yonit Halperin
resolves: rhbz#891326 Starting from commit 81fe00b08ad4f, red_detach_streams_behind can trigger modifications in the current tree (by update_area calls). Thus, after calling red_detach_streams_behind it is not safe to access tree entries that were calculated before the call. This patch inserts the

[Spice-devel] [spice-server PATCH 2/2] red_worker.c: clearing the stream vis_region, after it has been detached

2013-01-08 Thread Yonit Halperin
The stream vis_region should be cleared after the stream region was sent to the client losslessly. Otherwise, we might send redundant stream upgrades if we process more drawables that are dependent on the stream region. --- server/red_worker.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletion

Re: [Spice-devel] [xf86 qxl driver PATCH 5/5] qxl_driver: monitors_config: adjust to memory-remap

2013-01-21 Thread Yonit Halperin
Hi, On 01/17/2013 09:26 AM, Uri Lublin wrote: Resolves: rhbz#883578 Call qxl_allocate_monitors_config upon memory-remap such that qxl->monitors_config points to the start of monitors_config segment in qxl RAM memory. Currently after memory remap, it's possible that monitors_config memory and vi

Re: [Spice-devel] [xf86 qxl driver PATCH 5/5] qxl_driver: monitors_config: adjust to memory-remap

2013-01-21 Thread Yonit Halperin
On 01/21/2013 09:28 AM, Uri Lublin wrote: On 01/21/2013 04:16 PM, Yonit Halperin wrote: On 01/17/2013 09:26 AM, Uri Lublin wrote: Resolves: rhbz#883578 Call qxl_allocate_monitors_config upon memory-remap such that qxl->monitors_config points to the start of monitors_config segment in qxl

Re: [Spice-devel] Fedora 18 guest's GUI is slow. Due to 3D driver?

2013-01-24 Thread Yonit Halperin
Hi, On 01/24/2013 08:23 AM, javaon wrote: Thanks for replying, Alon. Yes, I found that 3d rendering in software. But.. is there any method to improve the response speed of Fedora GNOME desktop? You know, Windows XP/7 guest's speed is really pretty fast! Thanks. You can try disabling off scree

[Spice-devel] [spice-common PATCH] canvas_base: fix not caching palettes that belong to images that are not rendered

2013-01-31 Thread Yonit Halperin
Fixes: fedora 875348, 826036 When an image is not rendered, we still need to check if it contains a palette that needs to be cached. This bug caused the client to crash due to not finding palettes in the cache. --- common/canvas_base.c | 19 ++- 1 file changed, 18 insertions(+), 1

[Spice-devel] [PATCH spice-server 00/28] adaptive video streaming

2013-02-26 Thread Yonit Halperin
ront-end. - Add vp8 encoding - Solve some problems we have with video identification. - Try to achieve faster convergence to the "right" bit-rate when we start with a wrong estimation. long-term TODO: --- video pass-through Regards, Yonit. Yonit Halperin (28): red_wor

[Spice-devel] [PATCH spice-server 01/28] red_worker: stream agent - fix miscounting of frames

2013-02-26 Thread Yonit Halperin
Frames counting was skipped when the previous frame was already sent completely to the client. --- server/red_worker.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 11fa126..a4a369a 100644 --- a/server/red_work

[Spice-devel] [PATCH spice-server 02/28] server/red_worker: streams: moving mjpeg_encoder from Stream to StreamAgent

2013-02-26 Thread Yonit Halperin
The mjpeg_encoder should be client specific, and not shared between different clients**, for the following reasons: (1) Since we use abbreviated jpeg datastream for mjpeg, employing the same mjpeg_encoder for different clients might cause errors when the clients decode the jpeg data. (2) Th

[Spice-devel] [PATCH spice-server 03/28] mjpeg_encoder: configure mjpeg quality and frame rate according to a given bit rate

2013-02-26 Thread Yonit Halperin
Previously, the mjpeg quality was always 70. The frame rate was tuned according to the frames' congestion in the pipe. This patch sets the quality and frame rate according to a given bit rate and the size of the first encoded frames. The following patches will introduce an adaptive video streaming

[Spice-devel] [PATCH spice-server 04/28] mjpeg_encoder: re-configure stream parameters when the frame's encoding size changes

2013-02-26 Thread Yonit Halperin
If the encoding size seems to get smaller/bigger, re-evaluate the stream quality and frame rate. --- server/mjpeg_encoder.c | 147 ++--- 1 file changed, 139 insertions(+), 8 deletions(-) diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c index

[Spice-devel] [PATCH spice-server 05/28] mjpeg_encoder: adjust the stream bit rate based on periodic client feedback

2013-02-26 Thread Yonit Halperin
mjpeg_encoder can receive periodic reports about the playback status on the client side. Then, mjpeg_encoder analyses the report and can increase or decrease the stream bit rate, depending on the report. When the bit rate is changed, the quality and frame rate of the stream are re-evaluated. --- s

[Spice-devel] [PATCH spice-server 06/28] mjpeg_encoder: modify stream bit rate based on server side pipe congestion

2013-02-26 Thread Yonit Halperin
Downgrading stream bit rate when the input frame rate in the server exceeds the output frame rate, and frames are being dropped from the output pipe. --- server/mjpeg_encoder.c | 103 ++--- server/mjpeg_encoder.h | 10 + 2 files changed, 91 insertio

[Spice-devel] [PATCH spice-server 07/28] mjpeg_encoder: update the client with estimations for the required playback latency

2013-02-26 Thread Yonit Halperin
The required client playback latency is assessed based on the current estimation of the bit rate, the network latency, and the encoding size of the frames. When the playback delay that is reported by the client seems too small, or when the stream parameters change, we send the client an updated pla

[Spice-devel] [PATCH spice-server 08/28] mjpeg_encoder: move the control over frame drops to mjpeg_encoder

2013-02-26 Thread Yonit Halperin
--- server/mjpeg_encoder.c | 20 +--- server/mjpeg_encoder.h | 21 ++--- server/red_worker.c| 21 - 3 files changed, 39 insertions(+), 23 deletions(-) diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c index 70b6338..c124286 100644

[Spice-devel] [PATCH spice-server 09/28] mjpeg_encoder: keep the average observed fps similar to the defined fps

2013-02-26 Thread Yonit Halperin
The actual frames distribution does not necessarily fit the condition "at least one frame every (1000/rate_contorl->fps) milliseconds". For keeping the average frame rate close to the defined fps, we periodically measure the current average fps, and modify rate_control->adjusted_fps accordingly. Th

[Spice-devel] [PATCH spice-server 10/28] mjpeg_encoder: add stream warmup time, in which we avoid server and client drops

2013-02-26 Thread Yonit Halperin
The stream starts after lossless frames were sent to the client, and without rate control (except for pipe congestion). Thus, on the beginning of the stream, we might observe frame drops on the client and server side which are not necessarily related to mis-estimation of the bit rate, and we would

[Spice-devel] [PATCH spice-server 11/28] server: spice_timer_queue

2013-02-26 Thread Yonit Halperin
Each thread can create a spice_timer_queue, for managing its own timers. --- server/Makefile.am | 2 + server/spice_timer_queue.c | 268 + server/spice_timer_queue.h | 43 3 files changed, 313 insertions(+) create mode 100644 server/

[Spice-devel] [PATCH spice-server 12/28] server/red_worker: assign timer callbacks to worker_core, using spice_timer_queue

2013-02-26 Thread Yonit Halperin
display channel - supplying timeouts interface to red_channel, in order to allow periodic latency monitoring (see next patch). --- server/red_worker.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/server/red_worker.c b/server/red_worker.c index a390629..cb695fe 100644 --- a/s

[Spice-devel] [PATCH spice-server 13/28] red_channel: monitor connection latency using MSG_PING

2013-02-26 Thread Yonit Halperin
--- server/inputs_channel.c | 1 + server/main_channel.c | 2 +- server/red_channel.c| 228 server/red_channel.h| 18 server/red_worker.c | 2 +- server/smartcard.c | 1 + server/spicevmc.c | 1 + 7 files cha

[Spice-devel] [PATCH spice-server 15/28] server/red_worker: enable latency monitoring in the display channel

2013-02-26 Thread Yonit Halperin
--- server/red_worker.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/red_worker.c b/server/red_worker.c index 82f2fc9..5043c10 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -10116,6 +10116,7 @@ static CommonChannelClient *common_channel_client_cre

[Spice-devel] [PATCH spice-server 14/28] red_worker: stream - update periodically the input frame rate

2013-02-26 Thread Yonit Halperin
Periodically calculate the rate of frames arriving from the guest to the server. --- server/red_worker.c | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/server/red_worker.c b/server/red_worker.c index c992688..82f2fc9 100644 --- a/server/red

[Spice-devel] [PATCH spice-server 16/28] red_worker: start using mjpeg_encoder rate control capabilities

2013-02-26 Thread Yonit Halperin
This patch only employs setting the stream parameters based on the initial given bit-rate, the latency, and the encoding size. Later patches will also employ mjpeg_encoder response to client reports, and its control over frame drops. The patch also removes old stream bit rate calculations that wer

[Spice-devel] [PATCH spice-server 17/28] red_worker: support SPICE_MSGC_DISPLAY_STREAM_REPORT

2013-02-26 Thread Yonit Halperin
update mjpeg_encoder with reports from the client about the playback quality. --- server/red_dispatcher.c | 1 + server/red_worker.c | 86 +++-- 2 files changed, 85 insertions(+), 2 deletions(-) diff --git a/server/red_dispatcher.c b/server/red_dis

[Spice-devel] [PATCH spice-server 18/28] red_worker: notify mjpeg_encoder on server frame drops

2013-02-26 Thread Yonit Halperin
--- server/red_worker.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 23f9ca5..ff26f84 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -3169,13 +3169,19 @@ static inline void pre_stream_item_swap

[Spice-devel] [PATCH spice-server 19/28] red_worker: ignoring video frame drops that are not due to pipe congestion

2013-02-26 Thread Yonit Halperin
A frame can be dropped if a new frame was added during the same call to red_process_command (we didn't attempt to send the older frame). Such drops are ignored. --- server/red_worker.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/server/red_worker.c b/serve

[Spice-devel] [PATCH spice-server 20/28] dispatcher.h: fix - s/#define MAIN_DISPATCHER_H/#define DISPATCHER_H

2013-02-26 Thread Yonit Halperin
--- server/dispatcher.h | 6 +++--- server/main_dispatcher.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/server/dispatcher.h b/server/dispatcher.h index a468c58..1b389bd 100644 --- a/server/dispatcher.h +++ b/server/dispatcher.h @@ -1,5 +1,5 @@ -#ifndef MAIN_DISPATCH

[Spice-devel] [PATCH spice-server 21/28] snd_worker: support sending SPICE_MSG_PLAYBACK_LATENCY

2013-02-26 Thread Yonit Halperin
also update spice-common submodule --- server/snd_worker.c | 45 + server/snd_worker.h | 2 ++ 2 files changed, 47 insertions(+) diff --git a/server/snd_worker.c b/server/snd_worker.c index bc7be51..9353e82 100644 --- a/server/snd_worker.c +++ b/server

[Spice-devel] [PATCH spice-server 22/28] reds: support mm_time latency adjustments

2013-02-26 Thread Yonit Halperin
When there is no audio playback, we set the mm_time in the client to be older than the one in the server by at least the requested latency (the delta is actually bigger, due to the network latency). When there is an audio playback, we adjust the mm_time in the client by adjusting the playback buffe

[Spice-devel] [PATCH spice-server 23/28] red_worker: video streams - adjust client playback latency

2013-02-26 Thread Yonit Halperin
--- server/red_worker.c | 56 - 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 46dd069..acf391d 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -81,6 +81,7 @@ #include

[Spice-devel] [PATCH spice-server 24/28] server/red_worker.c: use the bit rate of old streams as a start point for new streams

2013-02-26 Thread Yonit Halperin
mjpeg_encoder modify the initial bit we supply it, according to the client feedback. If it reaches a bit rate which is higher than the initial one, we use the higher bit rate as the new bit rate estimation. --- server/mjpeg_encoder.c | 5 + server/mjpeg_encoder.h | 2 ++ server/red_worker.c

[Spice-devel] [PATCH spice-server 25/28] server/red_worker: add an option to supply the bandwidth via env var

2013-02-26 Thread Yonit Halperin
SPICE_BIT_RATE can be set for supplying red_worker the available bandwidth (in Mbps). --- server/red_worker.c | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 954b950..deb375c 100644 --- a/server/red_

[Spice-devel] [PATCH spice-server 26/28] collect and print video stream statistics

2013-02-26 Thread Yonit Halperin
--- server/mjpeg_encoder.c | 7 + server/red_worker.c| 69 +- 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c index 7825955..b5faed6 100644 --- a/server/mjpeg_encoder.c +++ b/ser

[Spice-devel] [PATCH spice-server 27/28] red_worker: increase the interval limit for stream frames

2013-02-26 Thread Yonit Halperin
--- server/red_worker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red_worker.c b/server/red_worker.c index 2cb9f62..81b86de 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -110,7 +110,7 @@ #define DISPLAY_FREE_LIST_DEFAULT_SIZE 128 #define RED_STR

[Spice-devel] [PATCH spice-server 28/28] red_worker: assign mm_time to vga frames

2013-02-26 Thread Yonit Halperin
--- server/red_worker.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 81b86de..f341b15 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -8565,6 +8565,7 @@ static inline int red_marshall_stream_data(Re

[Spice-devel] [PATCH spice-protocol 1/2] add SPICE_MSGC_DISPLAY_STREAM_REPORT

2013-02-26 Thread Yonit Halperin
If the server & client support SPICE_DISPLAY_CAP_STREAM_REPORT, the server first sends SPICE_MSG_DISPLAY_STREAM_ACTIVATE_REPORT. Then, the client periodically sends SPICE_MSGC_DISPLAY_STREAM_REPORT messages that supply the server details about the current quality of the video streaming on the clien

[Spice-devel] [PATCH spice-protocol 2/2] add SPICE_MSG_PLAYBACK_LATENCY

2013-02-26 Thread Yonit Halperin
SPICE_MSG_PLAYBACK_LATENCY is intended for adjusting the latency of the audio playback. It is used for synchronizing the audio and video playback. The corresponding capability is SPICE_PLAYBACK_CAP_LATENCY. --- spice/enums.h| 1 + spice/protocol.h | 1 + 2 files changed, 2 insertions(+) diff

[Spice-devel] [PATCH spice-common 1/2] add stream report messages

2013-02-26 Thread Yonit Halperin
If the server & client support SPICE_DISPLAY_CAP_STREAM_REPORT, the server first sends SPICE_MSG_DISPLAY_STREAM_ACTIVATE_REPORT. Then, the client periodically sends SPICE_MSGC_DISPLAY_STREAM_REPORT messages that supply the server details about the current quality of the video streaming on the clien

[Spice-devel] [PATCH spice-common 2/2] add SPICE_MSG_PLAYBACK_LATENCY

2013-02-26 Thread Yonit Halperin
SPICE_MSG_PLAYBACK_LATENCY is intended for adjusting the latency of the audio playback. It is used for synchronizing the audio and video playback. The corresponding capability is SPICE_PLAYBACK_CAP_LATENCY. --- common/messages.h | 4 spice-protocol| 2 +- spice.proto | 4 3 fil

[Spice-devel] [PATCH spice-gtk 1/8] channel-display: collect and print video stream stats

2013-02-26 Thread Yonit Halperin
also prints the number of underflows during a spice-pulse audio playback --- gtk/channel-display-priv.h | 17 gtk/channel-display.c | 50 -- gtk/spice-pulse.c | 9 - 3 files changed, 73 insertions(+), 3 deletions(-

[Spice-devel] [PATCH spice-gtk 2/8] spice-pulse: update the playback latency automatically when it changes

2013-02-26 Thread Yonit Halperin
--- gtk/spice-pulse.c | 69 +-- 1 file changed, 26 insertions(+), 43 deletions(-) diff --git a/gtk/spice-pulse.c b/gtk/spice-pulse.c index 295ea4f..107ce7c 100644 --- a/gtk/spice-pulse.c +++ b/gtk/spice-pulse.c @@ -275,6 +275,30 @@ static void s

[Spice-devel] [PATCH spice-gtk 3/8] channel-playback: provide access to playback properties via the session

2013-02-26 Thread Yonit Halperin
Support checking whether an audio playback is active and what its latency is. --- gtk/Makefile.am | 1 + gtk/channel-playback-priv.h | 23 +++ gtk/channel-playback.c | 24 gtk/spice-session-priv.h| 3 +++ gtk/spice-session.c

[Spice-devel] [PATCH spice-gtk 4/8] channel-display: video stream quality report

2013-02-26 Thread Yonit Halperin
handle MSG_STREAM_ACTIVIATE_REPORT and send MSGC_STREAM_REPORT periodically, or when the playback is out of sync. --- gtk/channel-display-priv.h | 10 gtk/channel-display.c | 116 - spice-common | 2 +- 3 files changed, 114 ins

[Spice-devel] [PATCH spice-gtk 5/8] channel-playback: support SPICE_MSG_PLAYBACK_LATENCY

2013-02-26 Thread Yonit Halperin
Add a new property for minimum playback latency. This property is updated with the value from SPICE_MSG_PLAYBACK_LATENCY. I also increased the default latency from 100ms to 200ms in order to be more robust to different bandwidth settings. --- gtk/channel-playback.c | 31 +++

[Spice-devel] [PATCH spice-gtk 6/8] spice-pulse: adjust the playback latency when the min-latency property changes

2013-02-26 Thread Yonit Halperin
If the current latency is smaller than the new min-latency value, we cork the playback till the target latency is achieved. Note: I didn't modify the prebuf configuration and used pa_stream_prebuf, because pulse updated the prebuf only if I set both prebuf and tlength to be target_latency*2. Then,

[Spice-devel] [PATCH spice-gtk 7/8] playback: support syncing the playback latency via session

2013-02-26 Thread Yonit Halperin
--- gtk/channel-playback-priv.h | 1 + gtk/channel-playback.c | 9 + gtk/spice-session-priv.h| 1 + gtk/spice-session.c | 15 +++ 4 files changed, 26 insertions(+) diff --git a/gtk/channel-playback-priv.h b/gtk/channel-playback-priv.h index dc89e2d..aa33d2c

[Spice-devel] [PATCH spice-gtk 8/8] channel-display: trigger re-sync of audio playback latency when there are frequent video frame drops

2013-02-26 Thread Yonit Halperin
This was added in order to respond more quickly when the audio and video playback are not synchronized, and when the latency between the client and the server is high (i.e., when the server response to the status is delayed). --- gtk/channel-display-priv.h | 2 ++ gtk/channel-display.c | 9 +

Re: [Spice-devel] [PATCH spice-server 00/28] adaptive video streaming

2013-02-26 Thread Yonit Halperin
Hi, The detailed results file is attached. Regards, Yonit. On 02/26/2013 01:03 PM, Yonit Halperin wrote: Hi, The following patch series introduces adaptive video streaming to spice. Until now, the mjpeg quality was constant (70), and the frame rate was modified according to the rate of

Re: [Spice-devel] [PATCH spice-server 00/28] adaptive video streaming

2013-02-26 Thread Yonit Halperin
Hi, On 02/26/2013 01:40 PM, Marc-André Lureau wrote: Hi - Mensaje original - The adaptive video streaming is implemented by the following heuristic: Given a bit rate, we calculate the best combination of mjpeg quality and frame rate (henceforth, the stream parameters) for this bit rate

Re: [Spice-devel] running gtk apps on kdm/kde gives very poor performance using qxl

2013-02-26 Thread Yonit Halperin
Hi, On 02/04/2013 06:27 AM, Rob Verduijn wrote: Hello, I'm not sure if this is the right mailinglist for my question so please forgive me and direct me to the proper one if its not. I've installed the latest spice releases on opensuse and everything is working fine. (usbredir, qxl etc) I use it

Re: [Spice-devel] [PATCH spice-server 00/28] adaptive video streaming

2013-02-27 Thread Yonit Halperin
On 02/26/2013 02:49 PM, Marc-André Lureau wrote: - Mensaje original - Hi, On 02/26/2013 01:40 PM, Marc-André Lureau wrote: Hi - Mensaje original - The adaptive video streaming is implemented by the following heuristic: Given a bit rate, we calculate the best combination of

Re: [Spice-devel] [PATCH spice-server 00/28] adaptive video streaming

2013-02-27 Thread Yonit Halperin
On 02/27/2013 09:30 AM, Hans de Goede wrote: Hi, On 02/27/2013 03:01 PM, Yonit Halperin wrote: On 02/26/2013 02:49 PM, Marc-André Lureau wrote: - Mensaje original - Hi, On 02/26/2013 01:40 PM, Marc-André Lureau wrote: Hi - Mensaje original - The adaptive video streaming

Re: [Spice-devel] Seamless mode for switch_host migration?

2013-03-01 Thread Yonit Halperin
Hi, On 02/28/2013 10:14 AM, David Jaša wrote: Hi, this email is a wrap-up of in-person discussion with Hans about bug: https://bugzilla.redhat.com/show_bug.cgi?id=884631 The problem is that if client tries to connect to destination host when VM is already migrating. The problem can be triggere

Re: [Spice-devel] [PATCH spice-server 00/28] adaptive video streaming

2013-03-07 Thread Yonit Halperin
Hi, On 03/03/2013 07:50 AM, Andrew Cathrow wrote: - Original Message - From: "Yonit Halperin" To: spice-de...@freedesktop.org Sent: Tuesday, February 26, 2013 1:03:46 PM Subject: [Spice-devel] [PATCH spice-server 00/28] adaptive video streaming Hi, The following pa

Re: [Spice-devel] [PATCH spice-server 05/28] mjpeg_encoder: adjust the stream bit rate based on periodic client feedback

2013-03-10 Thread Yonit Halperin
On 03/10/2013 06:50 AM, Alon Levy wrote: On Tue, Feb 26, 2013 at 01:03:51PM -0500, Yonit Halperin wrote: mjpeg_encoder can receive periodic reports about the playback status on the client side. Then, mjpeg_encoder analyses the report and can increase or decrease the stream bit rate, depending

Re: [Spice-devel] [PATCH spice-server 05/28] mjpeg_encoder: adjust the stream bit rate based on periodic client feedback

2013-03-11 Thread Yonit Halperin
Hi, On 03/10/2013 08:39 PM, Yonit Halperin wrote: On 03/10/2013 06:50 AM, Alon Levy wrote: On Tue, Feb 26, 2013 at 01:03:51PM -0500, Yonit Halperin wrote: mjpeg_encoder can receive periodic reports about the playback status on the client side. Then, mjpeg_encoder analyses the report and can

Re: [Spice-devel] qemu / spice server option passing help

2013-03-26 Thread Yonit Halperin
Hi, On 03/26/2013 01:36 PM, Jeremy White wrote: I thought it would be lovely if I could make my deferred_fps stuff available to users of qemu. I think it is a helpful change for people with bandwidth constraints. And, of course, it'd be nice if I weren't the only one using it . But as I went

Re: [Spice-devel] UMS memory management

2013-03-27 Thread Yonit Halperin
Hi, Sounds good. see my comments inline. On 03/27/2013 04:07 AM, Søren Sandmann wrote: Hello, The following is some notes on what I am planning to do for UMS memory management. It basically amounts to a rewrite of qxl-surface-ums.c Comments appreciated, especially regarding eviction policy, wh

Re: [Spice-devel] UMS memory management

2013-03-27 Thread Yonit Halperin
Hi, On 03/27/2013 06:17 AM, Hans de Goede wrote: Hi, On 03/27/2013 09:07 AM, Søren Sandmann wrote: Hello, The following is some notes on what I am planning to do for UMS memory management. It basically amounts to a rewrite of qxl-surface-ums.c Looks / sounds good, a few remarks below (note I

Re: [Spice-devel] UMS memory management

2013-03-28 Thread Yonit Halperin
On 03/28/2013 01:19 AM, Dave Airlie wrote: Can you please explain how all this relates to Dave's work on the KMS? He mentioned that he implemented paging there as well. Well we won't be using the KMS driver in RHEL6, so we need to improve the old UMS driver for that use case. Though I expect

Re: [Spice-devel] UMS memory management

2013-03-28 Thread Yonit Halperin
On 03/27/2013 10:28 AM, Alon Levy wrote: Hi, On 03/27/2013 06:17 AM, Hans de Goede wrote: Hi, On 03/27/2013 09:07 AM, Søren Sandmann wrote: Hello, The following is some notes on what I am planning to do for UMS memory management. It basically amounts to a rewrite of qxl-surface-ums.c Looks

Re: [Spice-devel] [PATCH spice 1/3] char_device: Properly update buffer status when leaving the write loop on stop

2013-04-01 Thread Yonit Halperin
Ack series On 03/29/2013 05:11 AM, Hans de Goede wrote: Before this patch the write-loop in spice_char_device_write_to_device would break on running becoming 0, after having written some data, without updating the buffer status, causing the same data to be written *again* when started. Signed-o

[Spice-devel] [spice-common PATCH] region.c: fix region_bounds_intersects

2013-04-02 Thread Yonit Halperin
region_bounds_intersects mistakingly ignored one of the input regions, and compared the other region to itself. --- common/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/region.c b/common/region.c index cd9ade0..14a27ed 100644 --- a/common/region.c +++ b/common

Re: [Spice-devel] [PATCH spice] snd_worker: Don't send empty audio-volume messages

2013-04-05 Thread Yonit Halperin
Ack On 04/05/2013 09:55 AM, Hans de Goede wrote: If no volume has been set it, we end up sending a volume message with audio-volume for 0 channels (iow an empty message). This is not useful and triggers the following warning in spice-gtk: (remote-viewer:8726): GSpice-WARNING **: set_sink_input_

[Spice-devel] [PATCH] red_worker.c: fix not destroying streams before sending MSG_MIGRATE

2013-04-08 Thread Yonit Halperin
When qemu migration completes, we need to stop the streams, and to send the corresponding upgrade_items to the client. Otherwise, (1) the client might display lossy regions that we don't track (streams are not part of the migration data). (2) streams_timeout may occur after MSG_MIGRATE has been sen

[Spice-devel] [PATCH spice-gtk] channel_base: exit handle_migrate when expecting MIGRATE_DATA and receiving something else

2013-04-08 Thread Yonit Halperin
Previously, when an error occurred on the src server side, and we received other message than MIGRATE_DATA, this messages was forwarded to the dest server, and made it crash. --- gtk/channel-base.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/channel-base.c b/gtk/c

<    3   4   5   6   7   8   9   10   >