Re: [PATCH 4/5] kgdb: Use atomic operators which use barriers

From: Linus Torvalds
Date: Fri Apr 02 2010 - 15:50:37 EST

On Fri, 2 Apr 2010, Linus Torvalds wrote:
> All that matters is that the above kind of while loop must work. The
> architecture needs to do whatever it needs to do to make it work. End of
> discussion. If on ARM6 that means "smp_mb()", then that's an ARM6
> implementation issue.

Put another way: from a kernel standpoint, cpu_relax() in _no_ way implies
a memory barrier. That has always been true, and that continues to be

But Linux does expect that if some other CPU modifies a memory location,
then we _will_ see that modification eventually. If the CPU needs help to
do so, then cpu_relax() needs to do that. Again - this has nothing to do
with memory barriers. It's just a basic requirement.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at