On Thu, Mar 10, 2011 at 8:13 AM, loody <miloody@gmail.com> wrote:
hi

2011/3/8 piyush moghe <pmkernel@gmail.com>:
> Yes what you are saying is also right, since in order to prevent the
> ordering all the pending memory operations should have completed
> hence as you mentioned processor stops and make sure all the memory
> operations are completed.
I am not sure whether all the memory operations are completed after
cpu stops running for a while.
I think there should be a more aggressive and precise instruction  to
handle this behavior, right?
appreciate your kind help,
miloody

a consolidated view of locking primitives is in 
linux-2.6.git/tools/perf/perf.h

it defines rmb(), cpu_relax() for many architectures in a single place.

the comment block here: 
 http://lxr.free-electrons.com/source/arch/x86/include/asm/system.h#L357

lines 371-421, say that rmb is heavier than memory_barrier() or barrier().
I think the comment speaks to your "aggressive and precise" questions.