Re: [PATCH RFC] libibverbs: add ARM64 memory barrier macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux