Linus Torvalds <[email protected]> wrote:
> The rules are, afaik, that reads can pass buffered writes, BUT WRITES
> CANNOT PASS READS (aka "writes to memory are always carried out in program
> order").
So in the example I gave, a read after the spin_unlock() may actually get
executed before the store in the spin_unlock(), but a read before the unlock
will not get executed after.
> No. Issuing a read barrier on one CPU will do absolutely _nothing_ on the
> other CPU.
Well, I think you mean will guarantee absolutely _nothing_ on the other CPU for
the Linux kernel. According to the IBM powerpc book I have, it does actually
do something on the other CPUs, though it doesn't say exactly what.
Anyway, thanks.
I'll write up some documentation on barriers for inclusion in the kernel.
David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]