Skip to contentSkip to conversation

SMP syncronization on AMD processors (broken?)

DISCUSSION Chuck Ebbert 1 participant 1 message Oct 8, 2005

lore
Share & tools
lore
#0 lore raw

In-Reply-To: <[email protected]>

Quoted 3 lines · Kirill Korotaev

The question is whether concurrent spin_lock()'s should acquire it in more or less "fair" fashinon or one of CPUs can starve any arbitrary time while others do reacquire it in a loop.

You neglected to say what CPU type you compiled the kernel for.

If it wasn't Pentium Pro maybe you could patch include/asm-i386/spinlock.h
line 82 (or the same place in x86-64) like this:

___
* (PPro errata 66, 92)
*/

-#if !defined(CONFIG_X86_OOSTORE) && !defined(CONFIG_X86_PPRO_FENCE) +#if 0

 #define __raw_spin_unlock_string \
         "movb $1,%0" \

___

The data might not make it out of the CPU write buffer without a locking instruction doing the update.
__
Chuck