Re: [Spice-devel] [PATCH 1/3] Add check for macOS, disable ucontext on macOS (deprecated)

2017-04-28 Thread Christophe de Dinechin

> On 28 Apr 2017, at 13:57, Daniel P. Berrange  wrote:
> 
> On Fri, Apr 28, 2017 at 07:48:01AM -0400, Marc-André Lureau wrote:
>> Hi
>> 
>> - Original Message -
>>> Subject: [PATCH 1/3] Add check for macOS, disable ucontext on macOS
>>> (deprecated)
>>> 
>> 
>> It's also deprecated on Linux afaik, but it's still the preferred way in 
>> qemu too.
>> 
>> An alternative would be to implement sigaltstack I suppose (available in 
>> qemu).
> 
> Until any OS actually remove ucontext, IMHO it is better to stick
> with the ucontext impl as it is tried & tested and known to have
> good performance. I certainly wouldn't recommend use of the
> gthread impl as its performance is going to be worse & has very
> little testing. 

macOS has zero testing right now anyway. But I can test the ucontext version 
instead and report.

Christophe

> 
> Regards,
> Daniel
> -- 
> |: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o-https://fstop138.berrange.com :|
> |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH 1/3] Add check for macOS, disable ucontext on macOS (deprecated)

2017-04-28 Thread Daniel P. Berrange
On Fri, Apr 28, 2017 at 07:48:01AM -0400, Marc-André Lureau wrote:
> Hi
> 
> - Original Message -
> > Subject: [PATCH 1/3] Add check for macOS, disable ucontext on macOS
> >  (deprecated)
> > 
> 
> It's also deprecated on Linux afaik, but it's still the preferred way in qemu 
> too.
>
> An alternative would be to implement sigaltstack I suppose (available in 
> qemu).

Until any OS actually remove ucontext, IMHO it is better to stick
with the ucontext impl as it is tried & tested and known to have
good performance. I certainly wouldn't recommend use of the
gthread impl as its performance is going to be worse & has very
little testing. 

Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH 1/3] Add check for macOS, disable ucontext on macOS (deprecated)

2017-04-28 Thread Marc-André Lureau
Hi

- Original Message -
> Subject: [PATCH 1/3] Add check for macOS, disable ucontext on macOS
>  (deprecated)
> 

It's also deprecated on Linux afaik, but it's still the preferred way in qemu 
too.

An alternative would be to implement sigaltstack I suppose (available in qemu).

> Signed-off-by: Christophe de Dinechin 
> ---
>  configure.ac | 14 ++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index ad5e6e9..a6ac2de 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -62,6 +62,18 @@ esac
>  AC_MSG_RESULT([$os_win32])
>  AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
>  
> +AC_MSG_CHECKING([for native macOS])
> +case "$host_os" in
> + *darwin*)
> +os_mac=yes
> +;;
> + *)
> +os_mac=no
> +;;
> +esac
> +AC_MSG_RESULT([$os_mac])
> +AM_CONDITIONAL([OS_MAC],[test "$os_mac" = "yes"])
> +
>  AC_CHECK_HEADERS([sys/socket.h netinet/in.h arpa/inet.h])
>  AC_CHECK_HEADERS([termios.h])
>  
> @@ -460,6 +472,8 @@ esac
>  if test "$with_coroutine" = "auto"; then
>if test "$os_win32" = "yes"; then
>  with_coroutine=winfiber
> +  elif test "$os_mac" = "yes"; then
> +with_coroutine=gthread
>else
>  with_coroutine=ucontext
>fi
> --
> 2.11.0 (Apple Git-81)
> 
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 1/3] Add check for macOS, disable ucontext on macOS (deprecated)

2017-04-28 Thread Christophe de Dinechin
Subject: [PATCH 1/3] Add check for macOS, disable ucontext on macOS
 (deprecated)

Signed-off-by: Christophe de Dinechin 
---
 configure.ac | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/configure.ac b/configure.ac
index ad5e6e9..a6ac2de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,6 +62,18 @@ esac
 AC_MSG_RESULT([$os_win32])
 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
 
+AC_MSG_CHECKING([for native macOS])
+case "$host_os" in
+ *darwin*)
+os_mac=yes
+;;
+ *)
+os_mac=no
+;;
+esac
+AC_MSG_RESULT([$os_mac])
+AM_CONDITIONAL([OS_MAC],[test "$os_mac" = "yes"])
+
 AC_CHECK_HEADERS([sys/socket.h netinet/in.h arpa/inet.h])
 AC_CHECK_HEADERS([termios.h])
 
@@ -460,6 +472,8 @@ esac
 if test "$with_coroutine" = "auto"; then
   if test "$os_win32" = "yes"; then
 with_coroutine=winfiber
+  elif test "$os_mac" = "yes"; then
+with_coroutine=gthread
   else
 with_coroutine=ucontext
   fi
-- 
2.11.0 (Apple Git-81)

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel