Boost logo

Boost :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-12-01 10:31:37

Peter Dimov wrote:
> Roland Schwarz wrote:

> There are fifteen, in principle. The basic bidirectional ordering
> constraints are #LoadLoad, #LoadStore, #StoreLoad and #StoreStore, and a
> barrier can include any subset of them. In practice #StoreLoad usually
> implies a full barrier.

Hmm, these names are from the sparc architecture, correct? I don't know
enough about this, so I would be glad if you could tell me more.
I was speaking (altough didn't make it explicit) about the three
barriers used in the linux kernel.

What is the semantics of e.g. #LoadLoad?
Does it mean loads may not be moved across the barrier? Does it mean
loads of the same memory location may not be moved across? Due to lack
of knowing the semantics I cannot understand your emulation example,
could you please be even more explicit?

> A load.acquire can be emulated as
> load
> #LoadLoad | #LoadStore

What does the "|" bar mean? Is this the means to define the subsets?
I.e.: When # means unordered
1) # | # | # | #
2) # | # | # | #StoreStore
3) # | # | #StoreLoad | #
4) # | # | #StoreLoad | #StoreStore
5) # | #LoadStore | # | #
Is this how you arrived at the number 15?

> Total order is a systemwide property of the memory model and can't
> necessarily be achieved with local barriers. It's possible for an SMP system
> to have full barriers and not deliver total order. As an example, if you
> have two CPUs execute

<example snipped>

Ok, thank you. Obviously I used the wrong name for what I was meaning.
I meant that either operation type read/write may not be reordered. How
would this be called then? Full ordering?

This brings up the question: Is there a kind of established naming? Can
you possibly suggest a book or certain articles I should study to learn
about the common aspects of memory visibility on multiprocessor systems?


Boost list run by bdawes at, gregod at, cpdaniel at, john at