]> git.baikalelectronics.ru Git - kernel.git/commit
Documentation/memory-barriers.txt: fix important typo re memory barriers
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 6 Jun 2014 21:36:41 +0000 (14:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Jun 2014 23:08:11 +0000 (16:08 -0700)
commitb6c7965d96ae44251672333be8ee0e171da9a0e5
tree06c165479bc9ef613c0b74fd50ac88346dd91c60
parent01a3ccbc791e72c11532c4ce724ed7eab19ab9ca
Documentation/memory-barriers.txt: fix important typo re memory barriers

Examples introducing neccesity of RMB+WMP pair reads as

        A=3 READ B
        www rrrrrr
        B=4 READ A

Note the opposite order of reads vs writes.

But the first example without barriers reads as

        A=3 READ A
        B=4 READ B

There are 4 outcomes in the first example.

But if someone new to the concept tries to insert barriers like this:

        A=3 READ A
        www rrrrrr
        B=4 READ B

he will still get all 4 possible outcomes, because "READ A" is first.

All this can be utterly confusing because barrier pair seems to be
superfluous.  In short, fixup first example to match latter examples
with barriers.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/memory-barriers.txt