From mboxrd@z Thu Jan 1 00:00:00 1970 From: jim.cromie@gmail.com (Jim Cromie) Date: Sat, 12 Mar 2011 19:26:11 -0700 Subject: where is __memory_barrier in kernel ? In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Thu, Mar 10, 2011 at 8:13 AM, loody wrote: > hi > > 2011/3/8 piyush moghe : > > 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110312/c8295070/attachment.html