[Spice-devel] [PATCH spice 5/5] red_channel: remove pre_disconnect hook

2012-03-10 Thread Hans de Goede
Now that red_worker's EventListener is gone there are no more users of it. Signed-off-by: Hans de Goede --- server/red_channel.c |3 --- server/red_channel.h |1 - 2 files changed, 4 deletions(-) diff --git a/server/red_channel.c b/server/red_channel.c index 5f906e6..ecb512d 100644 ---

[Spice-devel] [PATCH spice 4/5] red_worker: Rework poll code to use the watch interface

2012-03-10 Thread Hans de Goede
Commit 143a1df24e83e9c1e173c16aeb76d61ffdce9598 changed red_worker_main from epoll to poll. But epoll has edge triggered semantics (when requested and we requested them), where as poll is always level triggered. And red_worker was relying on the edge triggered semantics, as it was always polling fo

[Spice-devel] [PATCH spice 3/5] red_channel: Remove channel core to remove the stream watch on disconnect

2012-03-10 Thread Hans de Goede
We allow channels to have different core implementations, but we were relying on reds_stream_free to remove the stream watch on disconnect, and reds_stream_free always uses the qemu core implementation. So far we were getting away with this since all the alternative core implementations always ret

[Spice-devel] [PATCH spice 2/5] red_worker: Remove ref counting from the EventListener struct

2012-03-10 Thread Hans de Goede
The red_worker EventListener struct is either embedded in one of: 1) DisplayChannelClient 2) CursorChannelClient 3) RedWorker And as such gets destroyed when these get destroyed, in case 1 & 2 through a call to red_channel_client_destroy(). So free-ing it when the ref-count becomes 0 is wrong, fo

[Spice-devel] [PATCH spice 1/5] Ensure all members of ChannelCbs and ClientCbs are either assigned or NULL

2012-03-10 Thread Hans de Goede
While git-bisecting another issue I ended up hitting and not recognizing the bug fixed by commit 7a079b452b026d6ce38f95dcc397fa64b059fffb. While fixing this (again) I noticed that (even after the fix) not all users of ChannelCbs first zero it. So this patch ensures that all users of ChannelCbs fir

[Spice-devel] Fix red_worker threads consuming 100% cpu when a client is connected (v2)

2012-03-10 Thread Hans de Goede
Hi All, This patch series fixes an issue where red_worker thread consume as much CPU as they can get when a client is connected (the interesting part explaining what is going on is in the 4th patch. New in v2 is fixing the regression where multi head would crash, which did turn out to be a proble

Re: [Spice-devel] Fix red_worker threads consuming 100% cpu when a client is connected

2012-03-10 Thread Hans de Goede
Hi, On 03/10/2012 08:05 PM, Hans de Goede wrote: Hi All, This patch series fixes an issue where red_worker thread consume as much CPU as they can get when a client is connected (the interesting part explaining what is going on is in the 4th patch. Unfortunately with this series I can reproduca

[Spice-devel] [PATCH spice 5/5] red_channel: remove pre_disconnect hook

2012-03-10 Thread Hans de Goede
Now that red_worker's EventListener is gone there are no more users of it. Signed-off-by: Hans de Goede --- server/red_channel.c |3 --- server/red_channel.h |1 - 2 files changed, 4 deletions(-) diff --git a/server/red_channel.c b/server/red_channel.c index 5f906e6..ecb512d 100644 ---

[Spice-devel] [PATCH spice 4/5] red_worker: Rework poll code to use the watch interface

2012-03-10 Thread Hans de Goede
Commit 143a1df24e83e9c1e173c16aeb76d61ffdce9598 changed red_worker_main from epoll to poll. But epoll has edge triggered semantics (when requested and we requested them), where as poll is always level triggered. And red_worker was relying on the edge triggered semantics, as it was always polling fo

[Spice-devel] [PATCH spice 3/5] red_channel: Remove channel core to remove the stream watch on disconnect

2012-03-10 Thread Hans de Goede
We allow channels to have different core implementations, but we were relying on reds_stream_free to remove the stream watch on disconnect, and reds_stream_free always uses the qemu core implementation. So far we were getting away with this since all the alternative core implementations always ret

[Spice-devel] [PATCH spice 2/5] red_worker: Remove ref counting from the EventListener struct

2012-03-10 Thread Hans de Goede
The red_worker EventListener struct is either embedded in one of: 1) DisplayChannelClient 2) CursorChannelClient 3) RedWorker And as such gets destroyed when these get destroyed, in case 1 & 2 through a call to red_channel_client_destroy(). So free-ing it when the ref-count becomes 0 is wrong, fo

[Spice-devel] [PATCH spice 1/5] Ensure all members of ChannelCbs and ClientCbs are either assigned or NULL

2012-03-10 Thread Hans de Goede
While git-bisecting another issue I ended up hitting and not recognizing the bug fixed by commit 7a079b452b026d6ce38f95dcc397fa64b059fffb. While fixing this (again) I noticed that (even after the fix) not all users of ChannelCbs first zero it. So this patch ensures that all users of ChannelCbs fir

[Spice-devel] Fix red_worker threads consuming 100% cpu when a client is connected

2012-03-10 Thread Hans de Goede
Hi All, This patch series fixes an issue where red_worker thread consume as much CPU as they can get when a client is connected (the interesting part explaining what is going on is in the 4th patch. Unfortunately with this series I can reproducably crash the vm (qemu segfaults) when using multipl

Re: [Spice-devel] [PATCH 0/2] server: listen on a pre-opened file descriptor

2012-03-10 Thread Alon Levy
On Sat, Mar 10, 2012 at 08:56:55AM +0100, Hans de Goede wrote: > Hi, > > Thanks for the patches! > > Series looks good, ack! I would like one other spice developer more > familiar with the server to look at it and ack it too and then > I (or that other developer) will push it to our git master.

Re: [Spice-devel] [PATCH 1/2] server: don't fail on ENOPROTOOPT from setsockopt

2012-03-10 Thread Alon Levy
On Fri, Mar 09, 2012 at 12:26:50PM -0500, Nahum Shalman wrote: > If we allow listening on arbitrary sockets like unix sockets, > we can get ENOPROTOOPT errors from setsockopt calls that set TCP > specific options. This should be allowed to happen. I'm a little concerned that we will ignore actual

Re: [Spice-devel] Access local network printer from guest OS

2012-03-10 Thread Alon Levy
On Sat, Mar 10, 2012 at 10:58:27AM +0800, Charles.Tsai-蔡清海-研究發展部 wrote: > Alon, > > I am implementing the code for the printing redirection for spice > client. In the windows client, I know how to do it. Basically, I just follow > the footprint of the playbackchannel. However, I still