[ovs-dev] [PATCH] INSTALL: Note about compiler atomics support.

YAMAMOTO Takashi yamamoto at valinux.co.jp
Wed Jun 4 06:38:17 UTC 2014


> OVS is slow when compiled with pthreads atomics.  Add a generic note
> in INSTALL, with a reference to lib/ovs-atomic.h, where a new comment
> provides additional detail.
> 
> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>

Acked-by: YAMAMOTO Takashi <yamamoto at valinux.co.jp>

> ---
>  INSTALL          |    4 ++++
>  lib/ovs-atomic.h |    3 +++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/INSTALL b/INSTALL
> index 5c869b2..7b08172 100644
> --- a/INSTALL
> +++ b/INSTALL
> @@ -28,6 +28,10 @@ you will need the following software:
>            analysis and thread-safety checks.  For Ubuntu, there are
>            nightly built packages available on clang's website.
>  
> +        * While OVS may be compatible with other compilers, optimal
> +          support for atomic operations may be missing, making OVS
> +          very slow (see lib/ovs-atomic.h).
> +
>      - libssl, from OpenSSL, is optional but recommended if you plan to
>        connect the Open vSwitch to an OpenFlow controller.  libssl is
>        required to establish confidentiality and authenticity in the
> diff --git a/lib/ovs-atomic.h b/lib/ovs-atomic.h
> index c21b7ee..2452846 100644
> --- a/lib/ovs-atomic.h
> +++ b/lib/ovs-atomic.h
> @@ -257,6 +257,9 @@
>      #elif HAVE_GCC4_ATOMICS
>          #include "ovs-atomic-gcc4+.h"
>      #else
> +        /* ovs-atomic-pthreads implementation is provided for portability.
> +         * It might be too slow for real use because Open vSwitch is
> +         * optimized for platforms where real atomic ops are available. */
>          #include "ovs-atomic-pthreads.h"
>      #endif
>  #undef IN_OVS_ATOMIC_H
> -- 
> 1.7.10.4
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list