public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	Steve Wise
	<swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH RFC] libibverbs: add ARM64 memory barrier macros
Date: Thu, 19 May 2016 13:14:59 -0700	[thread overview]
Message-ID: <573E1EC3.5000907@sandisk.com> (raw)
In-Reply-To: <20160519180552.GA26130-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On 05/19/2016 11:05 AM, Jason Gunthorpe wrote:
> This is the mapping that matches the definitions of the barriers:
>
>   wmb can be memory_order_release
>   rmb can be memory_order_acquire
>   mb can be memory_order_seq_cst

This is not correct. Acquire and release, at least as defined by 
Gharachorloo in 1991, have another meaning than the mentioned barrier 
instructions. Acquire and release are labels that can be applied to load 
and store instructions respectively. Acquire semantics prevent 
reordering of a load-acquire instruction with any read or write 
operation which follows it in program order. Release semantics prevent 
reordering of a store-release with any read or write operation which 
precedes it in program order. Figure 2 in 
https://courses.engr.illinois.edu/cs533/sp2012/reading_list/2b.pdf 
illustrates this clearly.

I have not yet analyzed the meaning of acquire and release labels in the 
Itanium instruction set nor in the C11 memory consistency model closely 
but I think that acquire and release have the same meaning in these 
contexts as what has been explained above.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-05-19 20:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 21:16 [PATCH RFC] libibverbs: add ARM64 memory barrier macros Steve Wise
     [not found] ` <20160518220302.81260E09E9-/5N3P9jjx0xzbRFIqnYvSA@public.gmane.org>
2016-05-18 22:28   ` Jason Gunthorpe
     [not found]     ` <20160518222857.GB23835-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-19 16:02       ` Steve Wise
2016-05-19 16:35         ` Steve Wise
2016-05-19 18:05         ` Jason Gunthorpe
     [not found]           ` <20160519180552.GA26130-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-19 18:54             ` Steve Wise
2016-05-19 19:28               ` Jason Gunthorpe
     [not found]                 ` <20160519192805.GA32668-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-20  9:44                   ` Gabriele Svelto
     [not found]                     ` <b4eb5c63-9f20-b927-ebc8-f8016accc93c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-24 17:22                       ` Jason Gunthorpe
2016-05-19 20:14             ` Bart Van Assche [this message]
     [not found]               ` <573E1EC3.5000907-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-19 20:57                 ` Jason Gunthorpe

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=573E1EC3.5000907@sandisk.com \
    --to=bart.vanassche-xdaiopvojttbdgjk7y7tuq@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.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