From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755679AbaA2AUw (ORCPT ); Tue, 28 Jan 2014 19:20:52 -0500 Received: from one.firstfloor.org ([193.170.194.197]:36084 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752563AbaA2AUu (ORCPT ); Tue, 28 Jan 2014 19:20:50 -0500 Date: Wed, 29 Jan 2014 01:20:48 +0100 From: Andi Kleen To: Waiman Long Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Arnd Bergmann , linux-arch@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Steven Rostedt , Andrew Morton , Michel Lespinasse , Andi Kleen , Rik van Riel , "Paul E. McKenney" , Linus Torvalds , Raghavendra K T , George Spelvin , Tim Chen , Daniel J Blueman , Alexander Fyodorov , Aswin Chandramouleeswaran , Scott J Norton , Thavatchai Makphaibulchoke Subject: Re: [PATCH v3 1/2] qspinlock: Introducing a 4-byte queue spinlock implementation Message-ID: <20140129002048.GE11821@two.firstfloor.org> References: <1390933151-1797-1-git-send-email-Waiman.Long@hp.com> <1390933151-1797-2-git-send-email-Waiman.Long@hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1390933151-1797-2-git-send-email-Waiman.Long@hp.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So the 1-2 threads case is the standard case on a small system, isn't it? This may well cause regressions. > In the extremely unlikely case that all the queue node entries are > used up, the current code will fall back to busy spinning without > waiting in a queue with warning message. Traditionally we had some code which could take thousands of locks in rare cases (e.g. all locks in a hash table or all locks of a big reader lock) The biggest offender was the mm for changing mmu notifiers, but I believe that's a mutex now. lglocks presumably still can do it on large enough systems. I wouldn't be surprised if there is other code which e.g. make take all locks in a table. I don't think the warning is valid and will likely trigger in some obscure cases. -Andi