Thread (30 messages) 30 messages, 8 authors, 2007-08-16

Re: [PATCH 6/24] make atomic_read() behave consistently on frv

flat view

From: Paul E. McKenney <hidden>
Date: 2007-08-15 19:18:46
Also in: linux-arch, lkml

On Wed, Aug 15, 2007 at 08:51:58PM +0200, Segher Boessenkool wrote:
quoted
Well if there is only one memory location involved, then smp_rmb() 
isn't
going to really do anything anyway, so it would be incorrect to use it.
rmb() orders *any* two reads; that includes two reads from the same
location.
If the two reads are to the same location, all CPUs I am aware of
will maintain the ordering without need for a memory barrier.

						Thanx, Paul
quoted
Consider that smp_rmb basically will do anything from flushing the
pipeline to invalidating loads speculatively executed out of order. 
AFAIK
it will not control the visibility of stores coming from other CPUs 
(that
is up to the cache coherency).
The writer side should typically use wmb() whenever the reader side
uses rmb(), sure.


Segher

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help