Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264030AbTEWMHX (ORCPT ); Fri, 23 May 2003 08:07:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264034AbTEWMHW (ORCPT ); Fri, 23 May 2003 08:07:22 -0400 Received: from holomorphy.com ([66.224.33.161]:1683 "EHLO holomorphy") by vger.kernel.org with ESMTP id S264030AbTEWMHV (ORCPT ); Fri, 23 May 2003 08:07:21 -0400 Date: Fri, 23 May 2003 05:18:38 -0700 From: William Lee Irwin III To: Nikita Danilov Cc: Robert White , Nick Piggin , elladan@eskimo.com, Rik van Riel , David Woodhouse , ptb@it.uc3m.es, "Martin J. Bligh" , linux-kernel@vger.kernel.org, root@chaos.analogic.com Subject: Re: recursive spinlocks. Shoot. Message-ID: <20030523121838.GY8978@holomorphy.com> Mail-Followup-To: William Lee Irwin III , Nikita Danilov , Robert White , Nick Piggin , elladan@eskimo.com, Rik van Riel , David Woodhouse , ptb@it.uc3m.es, "Martin J. Bligh" , linux-kernel@vger.kernel.org, root@chaos.analogic.com References: <3ECC4C3A.9000903@cyberone.com.au> <16077.52259.718519.389903@laputa.namesys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16077.52259.718519.389903@laputa.namesys.com> Organization: The Domain of Holomorphy User-Agent: Mutt/1.5.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 992 Lines: 21 On Fri, May 23, 2003 at 11:22:11AM +0400, Nikita Danilov wrote: > and suppose they both are equally correct. Now, in (2) total amount of > time &lock is held is smaller than in (1), but (2) will usually perform > worse on SMP, because: > . spin_lock() is an optimization barrier > . taking even un-contended spin lock is an expensive operation, because > of the cache coherency issues. All good. Also, the arrival rate (i.e. frequency of lock acquisition) is more important to lock contention than hold time, so they're actually not being as friendly to big SMP as the comment from Robert White would suggest. The arrival rate tends to be O(cpus) since whatever codepath pounds on a lock on one cpu can be executed on all simultaneously. -- wli - 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/