Re: where is __memory_barrier in kernel ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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

2011/3/8 piyush moghe <pmkernel@xxxxxxxxx>:
> 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.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux