From: compudj@krystal.dyndns.org (Mathieu Desnoyers)
Subject: [ltt-dev] [URCU PATCH v2 1/2] caa: let per-arch files provide cmm_smp_* barriers
Date: Tue, 6 Sep 2011 07:31:30 -0400 [thread overview]
Message-ID: <BLU0-SMTP19A04EF1044EC10B152F5E961C0@phx.gbl> (raw)
In-Reply-To: <1315291712-22182-1-git-send-email-pbonzini@redhat.com>
* Paolo Bonzini (pbonzini at redhat.com) wrote:
> x86 instructions lfence and sfence are rarely needed, and 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.
Small nit: these 2 patches are named "caa:", but they should rather be
named "cmm:" (for Concurrent Memory Model).
Thanks!
Mathieu
>
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
> ---
> 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
prev parent reply other threads:[~2011-09-06 11:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-06 6:48 Paolo Bonzini
2011-09-06 6:48 ` [ltt-dev] [URCU PATCH v2 2/2] caa: do not generate code for smp_rmb/smp_wmb on x86_64, smp_rmb on i686 Paolo Bonzini
2011-09-06 11:30 ` Mathieu Desnoyers
2011-09-06 11:31 ` Mathieu Desnoyers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BLU0-SMTP19A04EF1044EC10B152F5E961C0@phx.gbl \
--to=compudj@krystal.dyndns.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox