Re: [Spice-devel] [PATCH 1/7] Add configure-time check for -Wl, --version-script option

2012-02-21 Thread Dan McGee
On Fri, Feb 17, 2012 at 4:21 AM, Daniel P. Berrange wrote: > The Solaris linker does actually support version scripts using the > exact same file syntax as the GNU linker. The only thing that is different > is the linker command line arg. Yes, using the -M option, I did see that much. > Mingw32 s

Re: [Spice-devel] [PATCH 0/7] Series of patches to add non-Linux server support

2012-02-21 Thread Dan McGee
On Fri, Feb 17, 2012 at 3:06 AM, Alon Levy wrote: > On Thu, Feb 16, 2012 at 11:30:06PM -0600, Dan McGee wrote: > > The title says non-linux, when in fact it's obvious from the rest of > what you write that the use case is Solaris. Why not say that? Because these patches should

Re: [Spice-devel] [PATCH 5/7] red_worker: reimplement event loop using poll()

2012-02-21 Thread Dan McGee
On Fri, Feb 17, 2012 at 7:34 AM, Paolo Bonzini wrote: > On 02/17/2012 02:18 PM, Alon Levy wrote: >>> > - guaranteed bitrot in the poll() path :) >>> > >> Yeah, I guess you are right. I'm worried since I don't know the >> difference in performance between epoll and poll > > You can assume it to be

[Spice-devel] [PATCH] red_worker: rename epoll_timeout to event_timeout

2012-02-20 Thread Dan McGee
With future patches in mind that will allow for some other non-Linux-specific event polling sytem to be used, rename this to a more generic name. All of the select/poll/epoll/kqueue family of calls are related to evented I/O, so 'event_' makes sense in this case. Signed-off-by:

Re: [Spice-devel] [PATCH 2/7] red_worker: rename epoll_timeout to event_timeout

2012-02-20 Thread Dan McGee
On Mon, Feb 20, 2012 at 6:07 PM, Dan McGee wrote: > On Fri, Feb 17, 2012 at 2:52 AM, Alon Levy wrote: >> On Thu, Feb 16, 2012 at 11:30:08PM -0600, Dan McGee wrote: >>> With future patches in mind that will allow for some other >>> non-Linux-specific event polling sytem

Re: [Spice-devel] [PATCH 2/7] red_worker: rename epoll_timeout to event_timeout

2012-02-20 Thread Dan McGee
On Fri, Feb 17, 2012 at 2:52 AM, Alon Levy wrote: > On Thu, Feb 16, 2012 at 11:30:08PM -0600, Dan McGee wrote: >> With future patches in mind that will allow for some other >> non-Linux-specific event polling sytem to be used, rename this to a more >> generic name. All of

[Spice-devel] [PATCH 7/7] Use standard IOV_MAX definition where applicable

2012-02-16 Thread Dan McGee
This is provided by on all platforms as long as _XOPEN_SOURCE is defined. On Linux, this is 1024, on Solaris, this is 16, and on any other platform, we now respect the value supported by the OS. Signed-off-by: Dan McGee --- server/main_channel.c |2 -- server/red_channel.c |2

[Spice-devel] [PATCH 6/7] Respect IOV_MAX if defined

2012-02-16 Thread Dan McGee
as necessary so the EAGAIN handling logic can determine where to resume the writev call the next time around. Signed-off-by: Dan McGee --- server/reds.c | 27 ++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/server/reds.c b/server/reds.c index 250e0ca

[Spice-devel] [PATCH 5/7] red_worker: reimplement event loop using poll()

2012-02-16 Thread Dan McGee
lost. The on_disconnect callback can not be moved before the close and other operations easily because of some behavior that relies on client_num being set to a certain value. Signed-off-by: Dan McGee --- Notes: >From what I can tell, the performance aspects of epoll() were never rea

[Spice-devel] [PATCH 4/7] Use memcpy call in red_channel_create

2012-02-16 Thread Dan McGee
Rather than assign the callbacks one-by-one, we can just memcpy the struct into the one we have allocated in our RedChannel object, which is much more efficient, not to mention future-proof when more callbacks are added. Signed-off-by: Dan McGee --- server/red_channel.c |9 + 1

[Spice-devel] [PATCH 3/7] Cleanup definitions of disconnect methods

2012-02-16 Thread Dan McGee
We had multiple stub methods that simply called other disconnect methods, making my head hurt with the indirection. Call the right methods at the right time and rip out the stub methods; if they are truely needed later they can be added again. Signed-off-by: Dan McGee --- server/red_channel.c

[Spice-devel] [PATCH 2/7] red_worker: rename epoll_timeout to event_timeout

2012-02-16 Thread Dan McGee
With future patches in mind that will allow for some other non-Linux-specific event polling sytem to be used, rename this to a more generic name. All of the select/poll/epoll/kqueue family of calls are related to evented I/O, so 'event_' makes sense in this case. Signed-off-by:

[Spice-devel] [PATCH 1/7] Add configure-time check for -Wl, --version-script option

2012-02-16 Thread Dan McGee
This is supported by the GNU linker, but not the Solaris linker, which is used as the default on that platform even when compiling with GCC. Omit passing the option to the linker on platforms that do not support it. Signed-off-by: Dan McGee --- configure.ac | 10 ++ server

[Spice-devel] [PATCH 0/7] Series of patches to add non-Linux server support

2012-02-16 Thread Dan McGee
ng with IO vector length. So in reality, the actual problem is fixed with either patch, but I think it would be best to get them both in. Questions/comments/feedback appreciated! This patch series has been both :ompile and run-tested at this point on Linux and Solaris. Dan McGee (7): Add

Re: [Spice-devel] [PATCH 2/2] Remove all usages of bzero()

2012-02-14 Thread Dan McGee
On Tue, Feb 14, 2012 at 10:18 AM, Alon Levy wrote: > On Tue, Feb 14, 2012 at 09:57:55AM -0600, Dan McGee wrote: >> As recommended by modern C practice, we should just be using memset(). > > Sorry for the lack of knowledge, but can you point to the > recommendation? >From `m

[Spice-devel] [PATCH 2/2] Remove all usages of bzero()

2012-02-14 Thread Dan McGee
As recommended by modern C practice, we should just be using memset(). Signed-off-by: Dan McGee --- server/tests/basic_event_loop.c |2 +- server/tests/test_display_base.c |6 +++--- server/tests/test_empty_success.c |4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff

[Spice-devel] [PATCH 1/2] Remove extra '\n' from red_printf() calls

2012-02-14 Thread Dan McGee
red_printf() takes care of adding a newline to all messages; remove the extra newline from all messages and macros that were doubling them up. Signed-off-by: Dan McGee --- common/spice_common.h |2 +- server/dispatcher.c | 12 ++-- server/red_worker.c |2 +- server

Re: [Spice-devel] [PATCH] Use non-zero data for initial ping

2012-02-14 Thread Dan McGee
On Tue, Feb 14, 2012 at 2:40 AM, Alon Levy wrote: > On Mon, Feb 13, 2012 at 01:48:41PM -0600, Dan McGee wrote: >> This prevents compression over things such as VPN links misleading us on >> available bandwidth. The page used before was 4K worth of zeroes, which >> isn'

Re: [Spice-devel] [PATCH] Use non-zero data for initial ping

2012-02-13 Thread Dan McGee
On Mon, Feb 13, 2012 at 3:11 PM, Yaniv Kaul wrote: > While the best thing would have been to pass the first image already to the > client using those 256K (and calculate the bandwidth based on the first data > passed to the client and continue to do so, as the protocol continues), the > next best

[Spice-devel] [PATCH] Add casts for compatibility purposes

2012-02-13 Thread Dan McGee
technically correct for all platforms. Signed-off-by: Dan McGee --- We don't fully compile on non-Linux platforms due to epoll() usage, but future patches I have planned might change that. This is just one small patch to make it easier to focus exclusively on the epoll stuff. common/marshal

[Spice-devel] [PATCH] Use non-zero data for initial ping

2012-02-13 Thread Dan McGee
After: 4096 seqdata 1213 seqdata.bz2 4119 seqdata.gz 3208 seqdata.xz Signed-off-by: Dan McGee --- This was a TODO item on the following page: http://spice-space.org/page/Features/Bandwidth_monitoring The standalone test program is below if anyone wants to try it out; simply pass 

Re: [Spice-devel] [PATCH 1/7] Fix line length errors in main_channel

2012-01-19 Thread Dan McGee
On Thu, Jan 19, 2012 at 3:14 PM, Daniel P. Berrange wrote: > On Thu, Jan 19, 2012 at 02:09:58PM -0600, Dan McGee wrote: >> These are all existing errors; fix them so they don't block future >> commits in this file unnecessarily. >> >>     error (1): len

[Spice-devel] [PATCH 4/7] server/inputs_channel: don't set O_ASYNC option on socket

2012-01-19 Thread Dan McGee
output to send a SIGIO signal to the running program. However, we don't handle this signal anywhere in the code, so setting the option is unnecessary. Signed-off-by: Dan McGee --- Sorry, botched the sending of this patch it looks like, trying again... If anyone knows more about O_ASYNC t

[Spice-devel] [PATCH 7/7] Use found python binary to check for pyparsing

2012-01-19 Thread Dan McGee
This matches what we do in client/Makefile.am to actually run the python scripts, which is to use the python binary we find first, preferring 'python2' over 'python'. This makes the compile work on odd systems such as Arch Linux where the python binary is actually python3.

[Spice-devel] [PATCH 6/7] Remove epoll headers from client code

2012-01-19 Thread Dan McGee
There is no more usage of epoll on the client side, so no need to include these header files. Signed-off-by: Dan McGee --- client/x11/named_pipe.cpp |1 - client/x11/platform.cpp |1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/client/x11/named_pipe.cpp b/client

[Spice-devel] [PATCH 5/7] server: don't complain if setsockopt(SO_PRIORITY) call fails

2012-01-19 Thread Dan McGee
From: Nahum Shalman dc7855967f4e did this for the TCP_NODELAY and IP_TOS calls; we should do it for priority as well if necessary. We also #ifdef the setting of the low-level socket priority based on whether we have a definition of SO_PRIORITY available. This option is not available on Illumos/S

[Spice-devel] [PATCH 4/7] server/inputs_channel: don't set O_ASYNC option on socket

2012-01-19 Thread Dan McGee
output to send a SIGIO signal to the running program. However, we don't handle this signal anywhere in the code, so setting the option is unnecessary. Signed-off-by: Dan McGee --- If anyone knows more about O_ASYNC than I do, please speak up, but doing some reading and research leads

[Spice-devel] [PATCH 3/7] Update .gitignore with a few more generated files

2012-01-19 Thread Dan McGee
Signed-off-by: Dan McGee --- .gitignore |2 ++ client/.gitignore |1 + client/x11/.gitignore |1 + common/.gitignore |1 + server/tests/.gitignore |2 ++ 5 files changed, 7 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index

[Spice-devel] [PATCH 2/7] Fix git commit hook errors in red_worker

2012-01-19 Thread Dan McGee
This ensures all line lengths are down below 100 characters as well as removing some trailing spaces. Signed-off-by: Dan McGee --- server/red_worker.c | 88 -- 1 files changed, 56 insertions(+), 32 deletions(-) diff --git a/server/red_worker.c

[Spice-devel] [PATCH 1/7] Fix line length errors in main_channel

2012-01-19 Thread Dan McGee
erver/main_channel.c +932 error (5): length @ server/main_channel.c +1044 Signed-off-by: Dan McGee --- server/main_channel.c | 23 --- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/server/main_channel.c b/server/main_channel.c index c4b2752..f7e1ab0 100644

[Spice-devel] [PATCH 0/7] Code cleanup and cross-platform changes

2012-01-19 Thread Dan McGee
h any feedback on these, thanks! -Dan Dan McGee (6): Fix line length errors in main_channel Fix git commit hook errors in red_worker Update .gitignore with a few more generated files server/inputs_channel: don't set O_ASYNC option on socket Remove epoll headers from client code Use fo