Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch > #33369 > unrolled thread
| Started by | Ivan Godard <ivan@millcomputing.com> |
|---|---|
| First post | 2016-01-31 17:10 -0800 |
| Last post | 2016-02-15 11:41 +0000 |
| Articles | 15 on this page of 35 — 10 participants |
Back to article view | Back to comp.arch
"volatile" on the Mill Ivan Godard <ivan@millcomputing.com> - 2016-01-31 17:10 -0800
Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-01 07:48 +0000
Re: "volatile" on the Mill William Edwards <willvarfar@gmail.com> - 2016-01-31 23:53 -0800
Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-01 08:47 +0000
Re: "volatile" on the Mill "Paul A. Clayton" <paaronclayton@gmail.com> - 2016-02-01 20:34 -0800
Re: "volatile" on the Mill already5chosen@yahoo.com - 2016-02-02 01:36 -0800
Re: "volatile" on the Mill Ivan Godard <ivan@millcomputing.com> - 2016-02-02 04:19 -0800
Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-02 12:55 +0000
Re: "volatile" on the Mill already5chosen@yahoo.com - 2016-02-02 05:16 -0800
Re: "volatile" on the Mill "Chris M. Thomasson" <nospam@nospam.nospam> - 2016-02-03 11:55 -0800
Re: "volatile" on the Mill "Chris M. Thomasson" <nospam@nospam.nospam> - 2016-02-08 11:10 -0800
Re: "volatile" on the Mill gpderetta <gpderetta@gmail.com> - 2016-02-15 02:27 -0800
Re: "volatile" on the Mill "Chris M. Thomasson" <nospam@nospam.nospam> - 2016-02-21 14:05 -0800
Re: "volatile" on the Mill gpderetta <gpderetta@gmail.com> - 2016-02-29 07:37 -0800
Re: "volatile" on the Mill "Chris M. Thomasson" <nospam@nospam.nospam> - 2016-03-07 15:24 -0800
Re: "volatile" on the Mill "Chris M. Thomasson" <nospam@nospam.nospam> - 2016-02-03 12:30 -0800
Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-02 11:16 -0800
Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-02 11:18 -0800
Re: "volatile" on the Mill already5chosen@yahoo.com - 2016-02-02 11:30 -0800
Re: "volatile" on the Mill "Paul A. Clayton" <paaronclayton@gmail.com> - 2016-02-02 11:37 -0800
Re: "volatile" on the Mill Ivan Godard <ivan@millcomputing.com> - 2016-02-02 15:22 -0800
Re: "volatile" on the Mill MitchAlsup <MitchAlsup@aol.com> - 2016-02-02 16:54 -0800
Re: "volatile" on the Mill anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-02-03 10:53 +0000
Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-03 07:19 -0800
Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-03 07:49 -0800
Re: "volatile" on the Mill anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-02-03 16:17 +0000
Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-03 12:41 -0800
Re: "volatile" on the Mill anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-02-04 17:03 +0000
Re: "volatile" on the Mill Quadibloc <jsavard@ecn.ab.ca> - 2016-02-03 12:47 -0800
Re: "volatile" on the Mill anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-02-04 17:20 +0000
Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-03 09:59 +0000
Re: "volatile" on the Mill Ivan Godard <ivan@millcomputing.com> - 2016-02-03 02:34 -0800
Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-03 11:01 +0000
Re: "volatile" on the Mill gpderetta <gpderetta@gmail.com> - 2016-02-15 02:18 -0800
Re: "volatile" on the Mill nmm@wheeler.UUCP (Nick Maclaren) - 2016-02-15 11:41 +0000
Page 2 of 2 — ← Prev page 1 [2]
| From | Ivan Godard <ivan@millcomputing.com> |
|---|---|
| Date | 2016-02-02 15:22 -0800 |
| Message-ID | <n8rdid$1c1$1@dont-email.me> |
| In reply to | #33436 |
On 2/2/2016 11:37 AM, Paul A. Clayton wrote: > On Tuesday, February 2, 2016 at 7:19:13 AM UTC-5, Ivan Godard wrote: >> On 2/2/2016 1:36 AM, already5chosen@yahoo.com wrote: > [snip] >>> Do not SPARC and zArch servers *currently* offer sequential >>> consistency? I'm not 100% sure about SPARC, but zArch surely fits the >>> bill, no? > > SPARC's Total Store Order allows stores to be reordered > after loads (according to McKenney's paper). The same > source indicates that zArch also allows stores to be > reordered after loads, but somewhat confusingly also > states "It also has comparatively strong memory-ordering > semantics, as shown in Table 5, which should allow the > smp_wmb() primitive to be a nop (and by the time you read > this, this change may well have happened).The table > actually understates the situation, as the zSeries memory > model is otherwise sequentially consistent, meaning that > all CPUs will agree on the order of unrelated stores from > different CPUs." That is the definition of "total global ordering", which is *not* the same as sequential consistency. in SC the actions of each CPU are seen in an internally consistent order by all, but the actions of different CPUs may be arbitrarily interleaved in different orders as seen by other CPUs. There are theorems that say that TGO is impossible to achieve by any distributed algorithm; it's the same problem as the global clock problem. TGO requires a single sequential issuer, or equivalently a single central clock that issues timestamps. <snip> > Transactional memory implementations limit the name > space and agent space at significant cost (and membar > could use similar hardware to reduce latency -- using > TM hardware to detect ordering violations has already > been proposed academically), typically not supporting > not-participating names (much less something like the > name removal in AMD's ASF). Transactional memory also > somewhat overspecifies in that the entire operation is > atomic (name removal provides some non-atomic behavior). I've somewhat wondered why other designs lack non-participant actions within transactional regions. Consider the problem of counting the number of retries that a transaction encountered. > This is not an area where I understand the considerations, > but even so it seems obvious that there are tradeoffs. > Even the pay-for-what-you-use philosophy is not obviously > the best way to proceed in all cases. > Yes :-)
[toc] | [prev] | [next] | [standalone]
| From | MitchAlsup <MitchAlsup@aol.com> |
|---|---|
| Date | 2016-02-02 16:54 -0800 |
| Message-ID | <83e6662a-a36d-445c-b80d-8d73b3d4a530@googlegroups.com> |
| In reply to | #33441 |
On Tuesday, February 2, 2016 at 5:22:34 PM UTC-6, Ivan Godard wrote: > > There are theorems that say that TGO is impossible to achieve by any > distributed algorithm; it's the same problem as the global clock > problem. Physicists have given up on the notion of a single time series of events since 1913. Its time computer science comes up with its version of time <relativity>.
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2016-02-03 10:53 +0000 |
| Message-ID | <2016Feb3.115327@mips.complang.tuwien.ac.at> |
| In reply to | #33443 |
MitchAlsup <MitchAlsup@aol.com> writes: >On Tuesday, February 2, 2016 at 5:22:34 PM UTC-6, Ivan Godard wrote: >> >> There are theorems that say that TGO is impossible to achieve by any >> distributed algorithm; it's the same problem as the global clock >> problem. > >Physicists have given up on the notion of a single time series of events >since 1913. What happened in 1913? Special relativity was published in 1905, and that already allows different orders of events by different observers. General relativity was presented in 1915, but I don't think it added anything significant for our question at hand. So let's look at special relativity: Two observers can observe events in different orders if they are in different places and are moving relative to each other. But still, each observer can compute the order that each other observer sees, so if they agree on a canonical observer, they can agree on a canonical order of events. The processors of a multiprocessor don't move relative to each other, so they don't need to agree on a common observer to determine the order of events. They just need to take the signal run-times into consideration. General relativity does not make a significant difference for multiprocessors, either. The gravity fields where multiprocessors operate are too weak and too uniform within the multiprocessor for it to make a difference. So any reference to relativistic physics is a red herring. >Its time computer science comes up with its version of >time <relativity>. Not at all. The problems we have to deal with can be discussed in the context of classical physics and have been dealt with in ancient times, when people created big empires with millions of processors (people) and signaling times on the order of months. The computer equivalent of the techniques used then is message passing and non-shared memory machines (usually called MPPs). We also have shared memory. One advantage is more flexibility in the allocation of memory to processors. If this is enough, and we use message passing for communication, we don't need much consistency (the processors just have to agree on which page belongs to which processor). If we also want to use shared memory for communication, we need shared-memory consistency. Hardware people have tried to make do with weaker-than-sequential-consistency models up to now, and throw the problems over to the software side, with the success that most people are still programming single-threaded applications. I think it's time that the hardware people accepted that weaker consistency models are not good enough and work on implementing sequential consistency; you managed to do denormal numbers and precise exceptions in hardware, and I have confidence that you can do it for sequential consistency, too. And don't let anybody tell you that relativistic physics makes this impossible. Alternatively, provide some better message passing support. Other things that are necessary are cheap thread/task creation and destruction, and cheap synchronization (the latter may be combinable with hardware message passing). - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html
[toc] | [prev] | [next] | [standalone]
| From | Quadibloc <jsavard@ecn.ab.ca> |
|---|---|
| Date | 2016-02-03 07:19 -0800 |
| Message-ID | <a5afbb97-5048-4671-a780-3a2976df8541@googlegroups.com> |
| In reply to | #33449 |
On Wednesday, February 3, 2016 at 4:38:25 AM UTC-7, Anton Ertl wrote: > So any reference to relativistic physics is a red herring. The important thing is: while relativity means that the order of events in time is not fixed, this doesn't cause problems. If, on the other hand, a computer is using all its parts to work together on solving a problem, then it depends on them working together harmoniously and not independently. So some new insight that _recognizes_ the existence of differences in synchronization, which is what relativity did, doesn't solve the problem. There is, I think, an obvious trivial solution. Whenever any processor accesses shared memory, slow the whole system down so that signals can travel from one end to the other - and the time overhead of memory access can also take place - within a single cycle. John Savard
[toc] | [prev] | [next] | [standalone]
| From | Quadibloc <jsavard@ecn.ab.ca> |
|---|---|
| Date | 2016-02-03 07:49 -0800 |
| Message-ID | <075b41d2-ad3c-4c1a-ae90-354cecb885b1@googlegroups.com> |
| In reply to | #33449 |
On Wednesday, February 3, 2016 at 4:38:25 AM UTC-7, Anton Ertl wrote: > I think it's time > that the hardware people accepted that weaker consistency models are > not good enough and work on implementing sequential consistency; you > managed to do denormal numbers and precise exceptions in hardware, and > I have confidence that you can do it for sequential consistency, too. I looked up the definition of sequential consistency, to be sure that I understood what was going on here clearly. According to the Wikipedia article, it is: For any given word in memory, every processor (concerned with the matter) is in agreement on the order in which all writes to that word took place. This is a condition that is sufficient to yield the desired condition of sequential consistency. The potential for problems exists when some parts of memory are close to some processors, and far away from other processors. So one has processors A and B, and memory words P and Q. A and P are close together, B and Q are close together, but they're far apart from each other. A is writing data to P and reading data from P, using it a lot. Similarly with B and Q. At about the same time, A begins a write to Q and B begins a write to P. Now, I don't see a problem with A "knowing" that the write to Q is going to be long-delayed, and the same being true for B in respect of its write to P. The end goal of this, though, is that all the operations of the computer - read, write, calculate - are to have taken place in some consistent sequence, even if that isn't quite their real temporal order. Presumably, the problem is that B experiences a write to Q from A _long after_ it initiated the write to P. But that write to Q came from A _before_ the write to P took place, and so it doesn't reflect what happened to P. So _if there is an implicit assumption that all writes, even non-local ones, take place immediately_ then you would basically have to slow the computer down _all the time_ so that signals could go from end to end between each cycle, because no part of the machine has a crystal ball that lets it see what other parts of the machine are doing before it can receive the news. So the question is: does "sequential consistency" essentially require the computer to behave as though there are no communication delays between its various parts? If so, it can't be achieved at reasonable cost, and making very large scalable systems requires doing without it. However, embarrassingly parallel problems are solved by large scalable systems successfully. This hints at how sequential consistency can be achieved without slowing the system down all the time... _if_ the long-distance writes in a program occur at infrequent points in the program, and when they occur is not _data dependent_, then one can schedule in advance when a master program will slow the whole machine down to allow for the cases where distant parts of the machine need to interact without "letters crossing in the mail". Which, of course, is _not_ every time a long-distance write is being performed, only when they form a cycle. So one can get things to work 'most of the time', but there is no acceptable general solution. Hardware designers cannot build computers that can see the future, or whose parts communicate instantaneously. At least, not yet. John Savard
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2016-02-03 16:17 +0000 |
| Message-ID | <2016Feb3.171724@mips.complang.tuwien.ac.at> |
| In reply to | #33451 |
Quadibloc <jsavard@ecn.ab.ca> writes:
>So _if there is an implicit assumption that all writes, even non-local ones=
>, take place immediately_ then you would basically have to slow the compute=
>r down _all the time_ so that signals could go from end to end between each=
> cycle, because no part of the machine has a crystal ball that lets it see =
>what other parts of the machine are doing before it can receive the news.
>
>So the question is: does "sequential consistency" essentially require the c=
>omputer to behave as though there are no communication delays between its v=
>arious parts? If so, it can't be achieved at reasonable cost, and making ve=
>ry large scalable systems requires doing without it.
In a way it does, but that does not mean you have to slow down
everything all the time. Just as precise exceptions don't mean that
you have to slow down everything all the time. It's sufficient to
slow things down in the few cases where it matters (and in those cases
every other approach would also encounter such slowdowns, due to
memory barriers or other strengthening mechanisms for weak consistency
models).
However, the solution I know for this problem is to do the loads
speculatively, and in those cases where sequential consistency gives a
different result for a sequentially consistent load than for the
speculative load, roll the machine back, and do the load and
everything starting from there again. IIRC [daya+14] implemented such
an approach. My guess is that, if the hardware people put their minds
to it, they can improve on that; but as long as the idea is that
weaker consistency is good enough, they won't do it, just as they did
not implement denormals in hardware for a long time, even though, as
it turns out, it costs relatively little.
@InProceedings{daya+14,
author = {Bhavya K. Daya and Chia-Hsin Owen Chen and Suvinay
Subramanian and Woo-Cheol Kwon and Sunghyun Park and
Tushar Krishna and Jim Holt and Anantha
P. Chandrakasan and L-Shiuan Peh},
title = {{SCORPIO}: A 36-Core Research-Chip Demonstrating
Snoopy Coherence on a Scalable Mesh {NoC} with
In-Network Ordering},
crossref = {isca14},
OPTpages = {},
url = {http://projects.csail.mit.edu/wiki/pub/LSPgroup/PublicationList/scorpio_isca2014.pdf},
annote = {The cores on the chip described in this paper access
their shared memory in a sequentially consistent
manner; what's more, the chip provides a significant
speedup in comparison to the distributed directory
and HyperTransport coherence protocols. The main
idea is to deal with the ordering separately from
the data, in a distributed way. The ordering
messages are relatively small (one bit per core).
For details see the paper.}
}
- anton
--
M. Anton Ertl Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html
[toc] | [prev] | [next] | [standalone]
| From | Quadibloc <jsavard@ecn.ab.ca> |
|---|---|
| Date | 2016-02-03 12:41 -0800 |
| Message-ID | <f40ceebb-f907-44a2-b9bd-06d6502f13f3@googlegroups.com> |
| In reply to | #33452 |
On Wednesday, February 3, 2016 at 9:38:15 AM UTC-7, Anton Ertl wrote: > However, the solution I know for this problem is to do the loads > speculatively, That is a sufficiently painful solution that I can understand why no one has designed it in, without being certain that it was absolutely necessary. Of course, though, presumably it _is_ necessary - some of the time, for working on some problems. So why isn't it there? For one thing, _every_ load would have to be speculative, not just some loads, since the reason for this is that we don't know something happened to the location. So one is talking about a processor which basically keeps a constant record of its activity, and which can be rolled back just about anywhere. Also, the signal that tells it to roll back is associated with the specific memory locations it had read. So basically every read is followed by a delayed read, during which a timestamp is picked up. Even that may not be enough, as a later write from a closer node, which is not relevant, might overwrite the significant write from a more distant node. So the protocol involved appears to be painful. John Savard
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2016-02-04 17:03 +0000 |
| Message-ID | <2016Feb4.180338@mips.complang.tuwien.ac.at> |
| In reply to | #33457 |
Quadibloc <jsavard@ecn.ab.ca> writes: >On Wednesday, February 3, 2016 at 9:38:15 AM UTC-7, Anton Ertl wrote: > >> However, the solution I know for this problem is to do the loads >> speculatively, > >That is a sufficiently painful solution that I can understand why no one has >designed it in, without being certain that it was absolutely necessary. Just like hardware denormals and precise exceptions. >Of course, though, presumably it _is_ necessary - some of the time, for working on some problems. Necessary in the sense that you cannot solve these problems with memory barriers or whatever other workarounds for weaker consistency models the architects of weaker consistency models provide? No, seqyential consistency is not necessary in that sense. However, I believe that it is necessary if you want more than a few specialists to do shared-memory programming. And hardware manufacturers want that. >For one thing, _every_ load would have to be speculative, not just some loads, >since the reason for this is that we don't know something happened to the >location. So one is talking about a processor which basically keeps a constant >record of its activity, and which can be rolled back just about anywhere. Snapshots would be good enough (and might be the way if you want lots of simple processors). However, we already have a mechanism for keeping track of everything and treating it as speculative in current out-of-order processors. Could we use that for implementing the rollback necessary for sequential consistency? For multi-socket systems the latencies are probably too big for the current buffer sizes, but for single-socket multi-core CPUs, maybe. So you would have to keep threads that share memory on the same socket. Probably good enough for a lot of stuff. Or you go for the snapshot approach and support across-socket consistency. Or people will figure out something better, like they have when they put their minds to hardware denormals. - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html
[toc] | [prev] | [next] | [standalone]
| From | Quadibloc <jsavard@ecn.ab.ca> |
|---|---|
| Date | 2016-02-03 12:47 -0800 |
| Message-ID | <2b301036-3a7e-440d-b188-12968e9bfaa8@googlegroups.com> |
| In reply to | #33452 |
On Wednesday, February 3, 2016 at 9:38:15 AM UTC-7, Anton Ertl wrote: > For details see the paper. After looking at the paper, I see it worked at 36 and 64 cores, but the network became too congested at 100 cores. So it doesn't look like the problem is "solved" for supercomputer-like arrays, just for manycore chips. John Savard
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2016-02-04 17:20 +0000 |
| Message-ID | <2016Feb4.182011@mips.complang.tuwien.ac.at> |
| In reply to | #33458 |
Quadibloc <jsavard@ecn.ab.ca> writes: >On Wednesday, February 3, 2016 at 9:38:15 AM UTC-7, Anton Ertl wrote: > >> For details see the paper. > >After looking at the paper, I see it worked at 36 and 64 cores, but the network >became too congested at 100 cores. So it doesn't look like the problem is >"solved" for supercomputer-like arrays, just for manycore chips. Yes. More research needed. And I doubt that shared memory (not just flexibly allocated memory) is really a good programming model for systems with high latency between processors. They did not use shared memory to manage the Roman empire. - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html
[toc] | [prev] | [next] | [standalone]
| From | nmm@wheeler.UUCP (Nick Maclaren) |
|---|---|
| Date | 2016-02-03 09:59 +0000 |
| Message-ID | <n8sj2i$476$1@dont-email.me> |
| In reply to | #33441 |
In article <n8rdid$1c1$1@dont-email.me>, Ivan Godard <ivan@millcomputing.com> wrote: >On 2/2/2016 11:37 AM, Paul A. Clayton wrote: >> >> ... The table >> actually understates the situation, as the zSeries memory >> model is otherwise sequentially consistent, meaning that >> all CPUs will agree on the order of unrelated stores from >> different CPUs." > >That is the definition of "total global ordering", which is *not* the >same as sequential consistency. in SC the actions of each CPU are seen >in an internally consistent order by all, but the actions of different >CPUs may be arbitrarily interleaved in different orders as seen by other >CPUs. It depends on what you mean by 'agree'. In SC, all CPUs agree about the store ordering, except that they hold no 'opinion' about any aspects that they cannot observe. In order to distinguish TGO from SC, there has to be an all-seeing external agent. Regards, Nick Maclaren.
[toc] | [prev] | [next] | [standalone]
| From | Ivan Godard <ivan@millcomputing.com> |
|---|---|
| Date | 2016-02-03 02:34 -0800 |
| Message-ID | <n8skv4$aqm$1@dont-email.me> |
| In reply to | #33446 |
On 2/3/2016 1:59 AM, Nick Maclaren wrote: > In article <n8rdid$1c1$1@dont-email.me>, > Ivan Godard <ivan@millcomputing.com> wrote: >> On 2/2/2016 11:37 AM, Paul A. Clayton wrote: >>> >>> ... The table >>> actually understates the situation, as the zSeries memory >>> model is otherwise sequentially consistent, meaning that >>> all CPUs will agree on the order of unrelated stores from >>> different CPUs." >> >> That is the definition of "total global ordering", which is *not* the >> same as sequential consistency. in SC the actions of each CPU are seen >> in an internally consistent order by all, but the actions of different >> CPUs may be arbitrarily interleaved in different orders as seen by other >> CPUs. > > It depends on what you mean by 'agree'. In SC, all CPUs agree about > the store ordering, except that they hold no 'opinion' about any > aspects that they cannot observe. In order to distinguish TGO from > SC, there has to be an all-seeing external agent. Actually no. If there are two actors A and B, and A stores AS1 and then AS2 while B stores BS1 and BS2, then in SC C will always see AS1 before AS2 and BS1 before BS2, but the ordering between the A's and B's is undefined: C might see AS1/AS2/BS1/BS2, or it might see BS1/BS2/AS1/AS2, or AS1/BS1/BS2/AS2, or whatever. And, importantly, the same is true of A and B as well. This stuff is subtle.
[toc] | [prev] | [next] | [standalone]
| From | nmm@wheeler.UUCP (Nick Maclaren) |
|---|---|
| Date | 2016-02-03 11:01 +0000 |
| Message-ID | <n8smmd$gkk$1@dont-email.me> |
| In reply to | #33447 |
In article <n8skv4$aqm$1@dont-email.me>,
Ivan Godard <ivan@millcomputing.com> wrote:
>>>>
>>>> ... The table
>>>> actually understates the situation, as the zSeries memory
>>>> model is otherwise sequentially consistent, meaning that
>>>> all CPUs will agree on the order of unrelated stores from
>>>> different CPUs."
>>>
>>> That is the definition of "total global ordering", which is *not* the
>>> same as sequential consistency. in SC the actions of each CPU are seen
>>> in an internally consistent order by all, but the actions of different
>>> CPUs may be arbitrarily interleaved in different orders as seen by other
>>> CPUs.
>>
>> It depends on what you mean by 'agree'. In SC, all CPUs agree about
>> the store ordering, except that they hold no 'opinion' about any
>> aspects that they cannot observe. In order to distinguish TGO from
>> SC, there has to be an all-seeing external agent.
>
>Actually no. If there are two actors A and B, and A stores AS1 and then
>AS2 while B stores BS1 and BS2, then in SC C will always see AS1 before
>AS2 and BS1 before BS2, but the ordering between the A's and B's is
>undefined: C might see AS1/AS2/BS1/BS2, or it might see BS1/BS2/AS1/AS2,
>or AS1/BS1/BS2/AS2, or whatever. And, importantly, the same is true of A
>and B as well.
But, if they see them, they will always see compatible orderings.
That's the very definition of sequential consistency!
... the result of any execution is the same as if the operations of
all the processors were executed in some sequential order, and the
operations of each individual processor appear in this sequence in
the order specified by its program.
That makes it very clear that, if two processors observe incompatible
orderings, the execution is not sequentially consistent.
>This stuff is subtle.
I agree there.
Regards,
Nick Maclaren.
[toc] | [prev] | [next] | [standalone]
| From | gpderetta <gpderetta@gmail.com> |
|---|---|
| Date | 2016-02-15 02:18 -0800 |
| Message-ID | <ad025fcf-d855-49d2-b5b7-e50cc26d3203@googlegroups.com> |
| In reply to | #33448 |
On Wednesday, February 3, 2016 at 11:04:27 AM UTC, Nick Maclaren wrote: > In article <n8skv4$aqm$1@dont-email.me>, > Ivan Godard <ivan@millcomputing.com> wrote: > >>>> > >>>> ... The table > >>>> actually understates the situation, as the zSeries memory > >>>> model is otherwise sequentially consistent, meaning that > >>>> all CPUs will agree on the order of unrelated stores from > >>>> different CPUs." > >>> > >>> That is the definition of "total global ordering", which is *not* the > >>> same as sequential consistency. in SC the actions of each CPU are seen > >>> in an internally consistent order by all, but the actions of different > >>> CPUs may be arbitrarily interleaved in different orders as seen by other > >>> CPUs. > >> > >> It depends on what you mean by 'agree'. In SC, all CPUs agree about > >> the store ordering, except that they hold no 'opinion' about any > >> aspects that they cannot observe. In order to distinguish TGO from > >> SC, there has to be an all-seeing external agent. > > > >Actually no. If there are two actors A and B, and A stores AS1 and then > >AS2 while B stores BS1 and BS2, then in SC C will always see AS1 before > >AS2 and BS1 before BS2, but the ordering between the A's and B's is > >undefined: C might see AS1/AS2/BS1/BS2, or it might see BS1/BS2/AS1/AS2, > >or AS1/BS1/BS2/AS2, or whatever. And, importantly, the same is true of A > >and B as well. > > But, if they see them, they will always see compatible orderings. > That's the very definition of sequential consistency! > > ... the result of any execution is the same as if the operations of > all the processors were executed in some sequential order, and the > operations of each individual processor appear in this sequence in > the order specified by its program. > > That makes it very clear that, if two processors observe incompatible > orderings, the execution is not sequentially consistent. > Exactly. The ordering is of course arbitrary, but once one is "chosen", all processors must agree on it on a SC system. For what is worth, in C++11 (I believe that C11 is similar) requires that a total *global* order exists for all SC modifications of (atomic) memory objects. This is, I believe, a non-controversial definition of SC (apart from the fact that only applies to atomic objects and not to all memory accesses in general); I believe that the Java MM uses a very similar definition. For example, TSO processors (x86, SPARC and it seems z series) differ from SC because they can see their own stores out of order (i.e. fulfilled from the write buffer) and a store-load is required to recover SC.
[toc] | [prev] | [next] | [standalone]
| From | nmm@wheeler.UUCP (Nick Maclaren) |
|---|---|
| Date | 2016-02-15 11:41 +0000 |
| Message-ID | <n9sdi5$npi$1@dont-email.me> |
| In reply to | #33663 |
In article <ad025fcf-d855-49d2-b5b7-e50cc26d3203@googlegroups.com>, gpderetta <gpderetta@gmail.com> wrote: >> >> That makes it very clear that, if two processors observe incompatible >> orderings, the execution is not sequentially consistent. > >Exactly. The ordering is of course arbitrary, but once one is "chosen", >all processors must agree on it on a SC system. > >For what is worth, in C++11 (I believe that C11 is similar) requires >that a total *global* order exists for all SC modifications of (atomic) >memory objects. This is, I believe, a non-controversial definition of SC >(apart from the fact that only applies to atomic objects and not to all >memory accesses in general); I believe that the Java MM uses a very >similar definition. No, it's not a definition and is neither necessary nor sufficient. But, yes, C++11 requires it, sort-of. The point is that the requirement is only for "as if" (i.e. the observable effects), both in C++ and SC, and the actual modification order need not be consistent. SC also requires that all reads must observe that order. Regards, Nick Maclaren.
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.arch
csiph-web