Well if there is only one memory location involved, then smp_rmb() isn'tgoing 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.
Consider that smp_rmb basically will do anything from flushing thepipeline to invalidating loads speculatively executed out of order. AFAIK it will not control the visibility of stores coming from other CPUs (thatis 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 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/
- Follow-Ups:
- Re: [PATCH 6/24] make atomic_read() behave consistently on frv
- From: "Paul E. McKenney" <[email protected]>
- Re: [PATCH 6/24] make atomic_read() behave consistently on frv
- References:
- Re: [PATCH 6/24] make atomic_read() behave consistently on frv
- From: Chris Snook <[email protected]>
- Re: [PATCH 6/24] make atomic_read() behave consistently on frv
- From: Chris Snook <[email protected]>
- [PATCH 6/24] make atomic_read() behave consistently on frv
- From: Chris Snook <[email protected]>
- Re: [PATCH 6/24] make atomic_read() behave consistently on frv
- From: David Howells <[email protected]>
- Re: [PATCH 6/24] make atomic_read() behave consistently on frv
- From: David Howells <[email protected]>
- Re: [PATCH 6/24] make atomic_read() behave consistently on frv
- From: Chris Snook <[email protected]>
- Re: [PATCH 6/24] make atomic_read() behave consistently on frv
- From: Nick Piggin <[email protected]>
- Re: [PATCH 6/24] make atomic_read() behave consistently on frv
- Prev by Date: Re: Thinking outside the box on file systems
- Next by Date: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- Previous by thread: Re: [PATCH 6/24] make atomic_read() behave consistently on frv
- Next by thread: Re: [PATCH 6/24] make atomic_read() behave consistently on frv
- Index(es):