Re: SMP syncronization on AMD processors (broken?)

From: Chuck Ebbert
Date: Sat Oct 08 2005 - 04:35:32 EST


In-Reply-To: <434520FF.8050100@xxxxx>

On Thu, 06 Oct 2005 at 17:05:03 +0400, Kirill Korotaev wrote:

> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/