Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750954AbVJFNvH (ORCPT ); Thu, 6 Oct 2005 09:51:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750957AbVJFNvG (ORCPT ); Thu, 6 Oct 2005 09:51:06 -0400 Received: from gw1.cosmosbay.com ([62.23.185.226]:59777 "EHLO gw1.cosmosbay.com") by vger.kernel.org with ESMTP id S1750954AbVJFNvF (ORCPT ); Thu, 6 Oct 2005 09:51:05 -0400 Message-ID: <43452BAC.3000306@cosmosbay.com> Date: Thu, 06 Oct 2005 15:50:36 +0200 From: Eric Dumazet User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: fr, en MIME-Version: 1.0 To: Andi Kleen CC: Kirill Korotaev , linux-kernel@vger.kernel.org, Linus Torvalds , Andrew Morton , xemul@sw.ru, Andrey Savochkin , st@sw.ru, discuss@x86-64.org Subject: Re: SMP syncronization on AMD processors (broken?) References: <434520FF.8050100@sw.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (gw1.cosmosbay.com [172.16.8.80]); Thu, 06 Oct 2005 15:50:36 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1104 Lines: 34 Andi Kleen a ?crit : > Kirill Korotaev writes: > > >>Please help with a not simple question about spin_lock/spin_unlock on >>SMP archs. 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. > > > They are not fully fair because of the NUMAness of the system. > Same on many other NUMA systems. > > We considered long ago to use queued locks to avoid this, but > they are quite costly for the uncongested case and never seemed worth it. > > So live with it. Unrelated, but that reminds me that current spinlock implementation on x86 imply that NR_CPUS should be < 128. Maybe we should reflect this in Kconfig ? config NR_CPUS range 2 128 Or use a plain int for spinlock, instead of a signed char. Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/