Re: [Spice-devel] [PATCH spice-gtk 09/14] channel: do not reenter the mainloop at every iteration

2013-09-12 Thread Yonit Halperin
ACK The rest of the patches that haven't been acked in this series, are the same as in the previous series, right? If so, ack series. Cheers, Yonit. On 09/12/2013 08:09 AM, Marc-André Lureau wrote: From: Marc-André Lureau The current coroutine channel_iterate() creates a GSource for the soc

Re: [Spice-devel] [PATCH spice-gtk 03/14] channels: use spice_channel_set_handlers()

2013-09-12 Thread Marc-André Lureau
- Original Message - > On Thu, Sep 12, 2013 at 06:10:38PM +0200, Marc-André Lureau wrote: > > yeah spice-common update was in the next one.. it's a bit of shame > > that when doing a rebase, the remote are not updated automatically, so > > it's easy to git commit -a --amend when doing an

[Spice-devel] [PATCH spice-server 2/3] red_channel: cleanup of red_channel_client blocking methods

2013-09-12 Thread Yonit Halperin
(1) receive timeout as a parameter. (2) add a return value and pass the handling of failures to the calling routine. --- server/red_channel.c | 73 ++-- server/red_channel.h | 22 ++-- server/red_worker.c | 53 +++

[Spice-devel] [PATCH spice-server 3/3] red_worker: disconnect the channel instead of shutdown in case of a blocking method failure

2013-09-12 Thread Yonit Halperin
rhbz#1004443 The methods that trigger waitings on the client pipe require that the waiting will succeed in order to continue, or otherwise, that all the living pipe items will be released (e.g., when we must destroy a surface, we need that all its related pipe items will be released). Shutdown of

[Spice-devel] [PATCH spice-server 1/3] red_worker: cleanup red_clear_surface_drawables_from_pipes

2013-09-12 Thread Yonit Halperin
(1) merge 'force' and 'wait_for_outgoing_item' to one parameter. 'wait_for_outgoing_item' is a derivative of 'force'. (2) move the call to red_wait_outgoing_item to red_clear_surface_drawables_from_pipe --- server/red_worker.c | 20 +++- 1 file changed, 11 insertions(+), 9 del

Re: [Spice-devel] oVirt support in aSPICE stalled due to broken network file I/O

2013-09-12 Thread i iordanov
Hi Christophe, It is currently very hard, bordering on impossible to build gvfs for Android, because it ends up depending on GTK. The sequence of dependencies is: glib network I/O -> gvfs -> libsoup-gnome -> gnome-keyring -> gcr-3 -> gcr-ui-3 -> GTK The glib guys are arguing that this is not a b

Re: [Spice-devel] oVirt support in aSPICE stalled due to broken network file I/O

2013-09-12 Thread Christophe Fergeau
Hey Iordan, On Thu, Sep 12, 2013 at 01:11:45PM -0400, i iordanov wrote: > Hi Christophe, > > It is currently very hard, bordering on impossible to build gvfs for > Android, because it ends up depending on GTK. The sequence of > dependencies is: > > glib network I/O -> gvfs -> libsoup-gnome -> gn

Re: [Spice-devel] [PATCH spice-gtk 03/14] channels: use spice_channel_set_handlers()

2013-09-12 Thread Christophe Fergeau
On Thu, Sep 12, 2013 at 06:10:38PM +0200, Marc-André Lureau wrote: > yeah spice-common update was in the next one.. it's a bit of shame > that when doing a rebase, the remote are not updated automatically, so > it's easy to git commit -a --amend when doing an interactive rebase > and slip in submod

Re: [Spice-devel] [PATCH spice-gtk 04/14] channel: add SPICE_DISABLE_CHANNELS

2013-09-12 Thread Christophe Fergeau
On Thu, Sep 12, 2013 at 06:11:53PM +0200, Marc-André Lureau wrote: > On Thu, Sep 12, 2013 at 6:01 PM, Christophe Fergeau > wrote: > > Is there a reason for doing a strstr rather than iterating over the string > > split on ':' ? > > simplicity, iirc, even glib does that. I would use different wo

Re: [Spice-devel] [PATCH spice-gtk 03/14] channels: use spice_channel_set_handlers()

2013-09-12 Thread Christophe Fergeau
ACK, thanks fro the split. Is the spice-common change needed in this patch? I would have expected it to be part of the next one? Christophe On Thu, Sep 12, 2013 at 02:09:11PM +0200, Marc-André Lureau wrote: > This allows to simplify a little bit derived class (no need to override > handle_msg), a

Re: [Spice-devel] [PATCH spice-gtk 02/14] channel: add spice_channel_set_handlers()

2013-09-12 Thread Christophe Fergeau
ACK On Thu, Sep 12, 2013 at 02:09:10PM +0200, Marc-André Lureau wrote: > This function will allow to set base handlers and specific channel > handlers in a common way, instead of each channel having to override the > base channel virtual handle_msg(). > --- > gtk/channel-base.c | 39 +++

Re: [Spice-devel] [PATCH spice-gtk 04/14] channel: add SPICE_DISABLE_CHANNELS

2013-09-12 Thread Christophe Fergeau
On Thu, Sep 12, 2013 at 02:09:12PM +0200, Marc-André Lureau wrote: > Allow to disable selectively channels, mainly used for testing, > ex: SPICE_DISABLE_CHANNELS=display spicy-stats -p 12345 > --- > gtk/spice-channel-priv.h | 2 ++ > gtk/spice-channel.c | 7 +++ > 2 files changed, 9 inser

Re: [Spice-devel] [PATCH spice-gtk 01/14] display: use bitfields for surface flags

2013-09-12 Thread Christophe Fergeau
ACK On Thu, Sep 12, 2013 at 02:09:09PM +0200, Marc-André Lureau wrote: > Checking by value make the flag fields useless. Unfortunately, when > adding more flags, the server will have to ensure it can safely send it, > by checking some of new client caps (for some features). > --- > gtk/channel-di

Re: [Spice-devel] [PATCH spice-gtk 04/14] channel: add SPICE_DISABLE_CHANNELS

2013-09-12 Thread Christophe Fergeau
On Thu, Sep 12, 2013 at 06:12:20PM +0200, Marc-André Lureau wrote: > In glib: > > domains = g_getenv ("G_MESSAGES_DEBUG"); > if (((log_level & INFO_LEVELS) == 0) || > domains == NULL || > (strcmp (domains, "all") != 0 && (!log_domain || !strstr > (domains, log_domain > retu

Re: [Spice-devel] [PATCH spice-gtk 04/14] channel: add SPICE_DISABLE_CHANNELS

2013-09-12 Thread Marc-André Lureau
On Thu, Sep 12, 2013 at 6:01 PM, Christophe Fergeau wrote: > On Thu, Sep 12, 2013 at 02:09:12PM +0200, Marc-André Lureau wrote: >> Allow to disable selectively channels, mainly used for testing, >> ex: SPICE_DISABLE_CHANNELS=display spicy-stats -p 12345 >> --- >> gtk/spice-channel-priv.h | 2 ++ >

Re: [Spice-devel] [PATCH spice-gtk 04/14] channel: add SPICE_DISABLE_CHANNELS

2013-09-12 Thread Marc-André Lureau
In glib: domains = g_getenv ("G_MESSAGES_DEBUG"); if (((log_level & INFO_LEVELS) == 0) || domains == NULL || (strcmp (domains, "all") != 0 && (!log_domain || !strstr (domains, log_domain return; On Thu, Sep 12, 2013 at 6:11 PM, Marc-André Lureau wrote: > On Thu, Sep 12,

Re: [Spice-devel] [PATCH spice-gtk 03/14] channels: use spice_channel_set_handlers()

2013-09-12 Thread Marc-André Lureau
yeah spice-common update was in the next one.. it's a bit of shame that when doing a rebase, the remote are not updated automatically, so it's easy to git commit -a --amend when doing an interactive rebase and slip in submodules update from the following commits (I think it even resolve silently th

Re: [Spice-devel] multi monitor setup ?

2013-09-12 Thread David Jaša
Hi Alexandre, Alexandre DERUMIER píše v Pá 30. 08. 2013 v 15:36 +0200: > Hi, > > I'm looking for documentation about multi monitor setup, and I can't find it. > > How do it work ? For Windows VMs, up to four qxl devices can be specified on the command line. Linux VMs will see 4 heads on the sin

[Spice-devel] [PATCH spice-gtk 14/14] display: unshare the palette cache

2013-09-12 Thread Marc-André Lureau
As pointed out by Yonit on the ML: > (1) the palette cache shouldn't be shared among the display channels. I.e., > there should be one instance per channel, and not one instance in > spice-session. --- gtk/channel-display.c| 4 +++- gtk/spice-session-priv.h | 1 - gtk/spice-session.c | 6

[Spice-devel] [PATCH spice-gtk 13/14] channel: unref incoming migrate data

2013-09-12 Thread Marc-André Lureau
--- gtk/channel-base.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gtk/channel-base.c b/gtk/channel-base.c index abcf9d9..646042d 100644 --- a/gtk/channel-base.c +++ b/gtk/channel-base.c @@ -169,12 +169,12 @@ void spice_channel_handle_migrate(SpiceChannel *channel,

[Spice-devel] [PATCH spice-gtk 11/14] gtk: use slices for frequently allocated objects

2013-09-12 Thread Marc-André Lureau
From: Marc-André Lureau --- gtk/channel-display.c | 4 ++-- gtk/spice-channel.c | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk/channel-display.c b/gtk/channel-display.c index 45d31c5..0af3859 100644 --- a/gtk/channel-display.c +++ b/gtk/channel-display.c @@ -6

[Spice-devel] [PATCH spice-gtk 12/14] gtk: simplify spice_channel_recv_msg

2013-09-12 Thread Marc-André Lureau
From: Marc-André Lureau Use of coroutines allow to simplify spice_channel_recv_msg(), it doesn't need to keep current reading state, it can rely on the coroutine stack for that. --- gtk/channel-base.c | 1 + gtk/spice-channel-priv.h | 3 +-- gtk/spice-channel.c | 50 +++-

[Spice-devel] [PATCH spice-gtk 09/14] channel: do not reenter the mainloop at every iteration

2013-09-12 Thread Marc-André Lureau
From: Marc-André Lureau The current coroutine channel_iterate() creates a GSource for the socket reenters the mainloop waiting for IO condition. This is really heavy usage of mainloop showing up in system time and user space profiling (10% of CPU time spent in mainloop overhead). Instead flush al

[Spice-devel] [PATCH spice-gtk 10/14] gtk: use GHashTable in display_cache

2013-09-12 Thread Marc-André Lureau
From: Marc-André Lureau The cache code isn't very quick, it shows up in profilers. Using GHashTable allows to simplify the code while making it faster. --- gtk/channel-cursor.c | 56 +++ gtk/channel-display.c | 93 +++--- gtk/spice-

[Spice-devel] [PATCH spice-gtk 07/14] display: keep a reference to the primary surface

2013-09-12 Thread Marc-André Lureau
Avoid hard-coding surface 0 as being primary, although in practice it always is so far. Also a lot of lookups are primary, so add a shortcut for this special case (~30% apparently), it shows some small lookup speedup. before: real 0m5.008s user 0m3.253s sys 0m2.015s after: real0m

[Spice-devel] [PATCH spice-gtk 08/14] util: avoid calling getenv for every SPICE_DEBUG

2013-09-12 Thread Marc-André Lureau
From: Marc-André Lureau That doesn't seem to really improve performance so much, but that' s what we should do probably. --- gtk/spice-util.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gtk/spice-util.c b/gtk/spice-util.c index e02fc4d..4372f28 100644 --- a

[Spice-devel] [PATCH spice-gtk 05/14] display: replace ring with hashtable

2013-09-12 Thread Marc-André Lureau
With a Spice replay (a tool not yet merged, but available in dev branches), the following commit improves a little bit performance by not spending so much CPU time in looking up surfaces. I found initially hotspot with "perf", and get a consistant ~200ms speedup with "time spicy-stats" after replac

[Spice-devel] [PATCH spice-gtk 06/14] display: make the hashtable to destroy the surface

2013-09-12 Thread Marc-André Lureau
Improve a bit the code by using hashtable ownership. --- gtk/channel-display.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gtk/channel-display.c b/gtk/channel-display.c index a0bdec1..8734721 100644 --- a/gtk/channel-display.c +++ b/gtk/channel-display.c @@

[Spice-devel] [PATCH spice-gtk 04/14] channel: add SPICE_DISABLE_CHANNELS

2013-09-12 Thread Marc-André Lureau
Allow to disable selectively channels, mainly used for testing, ex: SPICE_DISABLE_CHANNELS=display spicy-stats -p 12345 --- gtk/spice-channel-priv.h | 2 ++ gtk/spice-channel.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/gtk/spice-channel-priv.h b/gtk/spice-channel-priv.h inde

[Spice-devel] [PATCH spice-gtk 02/14] channel: add spice_channel_set_handlers()

2013-09-12 Thread Marc-André Lureau
This function will allow to set base handlers and specific channel handlers in a common way, instead of each channel having to override the base channel virtual handle_msg(). --- gtk/channel-base.c | 39 +++ gtk/spice-channel-priv.h | 2 ++ gtk/spice-chan

[Spice-devel] [PATCH spice-gtk 03/14] channels: use spice_channel_set_handlers()

2013-09-12 Thread Marc-André Lureau
This allows to simplify a little bit derived class (no need to override handle_msg), and allows the base class more flexibility (for example for filtering messages, as in the following patch) --- gtk/channel-cursor.c | 43 - gtk/channel-display.c| 97 +++

[Spice-devel] [PATCH spice-gtk 01/14] display: use bitfields for surface flags

2013-09-12 Thread Marc-André Lureau
Checking by value make the flag fields useless. Unfortunately, when adding more flags, the server will have to ensure it can safely send it, by checking some of new client caps (for some features). --- gtk/channel-display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/

Re: [Spice-devel] [PATCH spice-gtk 4/4] canvas: use precomputed revers_bits

2013-09-12 Thread Christophe Fergeau
On Thu, Sep 12, 2013 at 01:32:07PM +0200, Marc-André Lureau wrote: > On Wed, Sep 11, 2013 at 11:09 AM, Christophe Fergeau > wrote: > > On Tue, Sep 10, 2013 at 04:43:39PM +0200, Marc-André Lureau wrote: > >> From: Marc-André Lureau > >> > >> Thos function shows up in some profiling results, it see

Re: [Spice-devel] [PATCH spice-gtk 4/4] canvas: use precomputed revers_bits

2013-09-12 Thread Marc-André Lureau
On Thu, Sep 12, 2013 at 1:32 PM, Marc-André Lureau wrote: > On Wed, Sep 11, 2013 at 11:09 AM, Christophe Fergeau > wrote: > (fyi, 5% is about the same amount of cpu used for glz or quic decoding > in this recording) scrap that, they take much more if you cumulate all their functions. -- Ma

Re: [Spice-devel] [PATCH spice-gtk 4/4] canvas: use precomputed revers_bits

2013-09-12 Thread Marc-André Lureau
On Wed, Sep 11, 2013 at 11:09 AM, Christophe Fergeau wrote: > On Tue, Sep 10, 2013 at 04:43:39PM +0200, Marc-André Lureau wrote: >> From: Marc-André Lureau >> >> Thos function shows up in some profiling results, it seems we can >> trivially replace it with a precomputed array of 256bytes. > > I f

[Spice-devel] aSPICE can support usbredir?

2013-09-12 Thread lichao201005
hi: Thanks about your hard work. I use aSPICE in my Android device and she works well.And I also built SPICE client for Android (https://github.com/iiordanov/bVNC). But they do not support usbredir, if I want them to support, how can I do? Are you planning a version with usbredir? Tha