Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29772
b: refs/heads/master
c: 2b94895
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Jun 25, 2006
1 parent 3816649 commit 6617424
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 326f28e9ec4b2619c2fd410593fc95fcb0ba6b41
refs/heads/master: 2b94895b9281976cf2a0f2f89bf41ee219742235
15 changes: 10 additions & 5 deletions trunk/Documentation/memory-barriers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,14 @@ What is required is some way of intervening to instruct the compiler and the
CPU to restrict the order.

Memory barriers are such interventions. They impose a perceived partial
ordering between the memory operations specified on either side of the barrier.
They request that the sequence of memory events generated appears to other
parts of the system as if the barrier is effective on that CPU.
ordering over the memory operations on either side of the barrier.

Such enforcement is important because the CPUs and other devices in a system
can use a variety of tricks to improve performance - including reordering,
deferral and combination of memory operations; speculative loads; speculative
branch prediction and various types of caching. Memory barriers are used to
override or suppress these tricks, allowing the code to sanely control the
interaction of multiple CPUs and/or devices.


VARIETIES OF MEMORY BARRIER
Expand Down Expand Up @@ -461,8 +466,8 @@ Whilst this may seem like a failure of coherency or causality maintenance, it
isn't, and this behaviour can be observed on certain real CPUs (such as the DEC
Alpha).

To deal with this, a data dependency barrier must be inserted between the
address load and the data load:
To deal with this, a data dependency barrier or better must be inserted
between the address load and the data load:

CPU 1 CPU 2
=============== ===============
Expand Down

0 comments on commit 6617424

Please sign in to comment.