Re: different kind of memory reordering clarification

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

 



On Tue, Apr 10, 2018 at 10:04:09AM -0700, Paul E. McKenney wrote:
> On Tue, Apr 10, 2018 at 11:20:24PM +0800, Yubin Ruan wrote:
> > On Tue, Apr 10, 2018 at 08:14:08PM +0800, Yubin Ruan wrote:
[...]
> > > 
> > > Can you please provide me with some examples or references for different kinds
> > > of memory reordering in a SMP system? You know, there are different kinds of
> > > reordering:
> > > 
> > >    - Loads reordered after loads
> > >    - Loads reordered after stores
> > >    - Stores reordered after stores
> > >    - Stores reordered after loads
> > >    - Atomic reordered with loads
> > >    - Atomic reordered with stores
> > >    - Dependent loads reordered (DEC alpha)
> > 
> > I remember there is open-std.org webpage containing comparision of C++'s
> > memory model to those primitives used in the Linux kernel. But I just can't
> > find that page.
> 
> Here you go!
> 
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0124r4.html
> 
> There will be an update in a month or so, but the above is pretty
> close.  Also, the Linux-kernel memory model was presented at
> ASPLOS and accepted into the Linux kernel itself:
> 
> https://paulmck.livejournal.com/49667.html

Many thanks. But I am currently confused about the relationship between
terminologies used in the Linux kernel and those used in some programming
languages (e.g., C++), i.e., the relationships between

    memory_order_release
    memory_order_relaxed
    memory_order_acquire
    memory_order_seq_cst
    ...

and those used in the kernel:

    READ_ONCE() / WRITE_ONCE()
    rmb() / wmb() / mb() / smp_mb()
    ...

Any materials for that?

Yubin
--
To unsubscribe from this list: send the line "unsubscribe perfbook" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux