[lkml]   [2004]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [ACPI] Re: Linux 2.4.26-rc1 (cmpxchg vs 80386 build)
    > In Intel machines ALL memory operations are atomic. What
    > the means is that if I make code that does:
    > addl %eax,(memory)
    > ... what's in memory will always be the sum of what it was
    > before and the value in the EAX register.

    Except on SMP.

    > A long time ago, somebody invented the 'lock' instruction
    > for Intel machines. It turns out that the first ones locked
    > the whole bus during an operation. Eventually somebody looked
    > at that, and by the time the '486 came out, they no longer
    > locked the whole bus. Then somebody else said; "WTF...
    > Why do we even need this stuff". It was a throw-back to
    > early primitive machines where there were only load and
    > store operations in memory. All arithmetic had to be done
    > in registers. Now, there are only a couple instructions you
    > can use the lock prefix with, or you get an invalid opcode
    > trap, and they are really no-ops because the instruction
    > itself is atomic.

    Not on SMP. On SMP, lock prefix *is needed*.

    If you think I'm wrong, point me to the relevant docs.

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

     \ /
      Last update: 2005-03-22 14:03    [W:0.020 / U:74.452 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site