[ltt-dev] [URCU PATCH v3 1/2] cmm: let per-arch files provide cmm_smp_* barriers

Mathieu Desnoyers compudj at krystal.dyndns.org
Sat Sep 10 15:23:40 EDT 2011


* Paolo Bonzini (pbonzini at redhat.com) wrote:
> x86 instructions lfence and sfence are rarely needed, thus we want
> the cmm_smp_rmb/cmm_smp_wmb macros to be simple compiler barriers.
> So, let the per-arch files override the default definitions in
> arch/generic.h.
> 
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>

Merged, thanks!

Mathieu

> ---
>  urcu/arch/generic.h |   28 ++++++++++++++++++++++++++++
>  1 files changed, 28 insertions(+), 0 deletions(-)
> 
> diff --git a/urcu/arch/generic.h b/urcu/arch/generic.h
> index 100d3c6..1ea7f59 100644
> --- a/urcu/arch/generic.h
> +++ b/urcu/arch/generic.h
> @@ -100,22 +100,50 @@ extern "C" {
>  #endif
>  
>  #ifdef CONFIG_RCU_SMP
> +#ifndef cmm_smp_mb
>  #define cmm_smp_mb()	cmm_mb()
> +#endif
> +#ifndef cmm_smp_rmb
>  #define cmm_smp_rmb()	cmm_rmb()
> +#endif
> +#ifndef cmm_smp_wmb
>  #define cmm_smp_wmb()	cmm_wmb()
> +#endif
> +#ifndef cmm_smp_mc
>  #define cmm_smp_mc()	cmm_mc()
> +#endif
> +#ifndef cmm_smp_rmc
>  #define cmm_smp_rmc()	cmm_rmc()
> +#endif
> +#ifndef cmm_smp_wmc
>  #define cmm_smp_wmc()	cmm_wmc()
> +#endif
> +#ifndef cmm_smp_read_barrier_depends
>  #define cmm_smp_read_barrier_depends()	cmm_read_barrier_depends()
> +#endif
>  #else
> +#ifndef cmm_smp_mb
>  #define cmm_smp_mb()	cmm_barrier()
> +#endif
> +#ifndef cmm_smp_rmb
>  #define cmm_smp_rmb()	cmm_barrier()
> +#endif
> +#ifndef cmm_smp_wmb
>  #define cmm_smp_wmb()	cmm_barrier()
> +#endif
> +#ifndef cmm_smp_mc
>  #define cmm_smp_mc()	cmm_barrier()
> +#endif
> +#ifndef cmm_smp_rmc
>  #define cmm_smp_rmc()	cmm_barrier()
> +#endif
> +#ifndef cmm_smp_wmc
>  #define cmm_smp_wmc()	cmm_barrier()
> +#endif
> +#ifndef cmm_smp_read_barrier_depends
>  #define cmm_smp_read_barrier_depends()
>  #endif
> +#endif
>  
>  #ifndef caa_cpu_relax
>  #define caa_cpu_relax()		cmm_barrier()
> -- 
> 1.7.6
> 
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list