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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Friday, April 2, 2010 - 4:24 pm

On Fri, 2 Apr 2010, Russell King - ARM Linux wrote:

I always agreed that it was not a memory barrier.

In fact, the commit that extended on the "volatile-considered-harmful" 
patch from you has this quote from me in the commit logs:

    Linus sayeth:
    
    : I don't think it was ever the intention that it would be seen as anything
    : but a compiler barrier, although it is obviously implied that it might
    : well perform some per-architecture actions that have "memory barrier-like"
    : semantics.
    :
    : After all, the whole and only point of the "cpu_relax()" thing is to tell
    : the CPU that we're busy-looping on some event.
    :
    : And that "event" might be (and often is) about reading the same memory
    : location over and over until it changes to what we want it to be.  So it's
    : quite possible that on various architectures the "cpu_relax()" could be
    : about making sure that such a tight loop on loads doesn't starve cache
    : transactions, for example - and as such look a bit like a memory barrier
    : from a CPU standpoint.
    :
    : But it's not meant to have any kind of architectural memory ordering
    : semantics as far as the kernel is concerned - those must come from other
    : sources.

which I think is pretty clear. 

But that quote seems to be the one where you then think I "agree" with 
you.

			Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 4/5] kgdb: Use atomic operators which use barriers, Russell King - ARM Linux, (Fri Apr 2, 3:25 pm)
Re: [PATCH 4/5] kgdb: Use atomic operators which use barriers, Linus Torvalds, (Fri Apr 2, 4:24 pm)
Re: [PATCH 4/5] kgdb: Use atomic operators which use barriers, Russell King - ARM Linux, (Sat Apr 3, 9:08 am)