From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753309AbdBGIpy (ORCPT ); Tue, 7 Feb 2017 03:45:54 -0500 Received: from merlin.infradead.org ([205.233.59.134]:39658 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752739AbdBGIpx (ORCPT ); Tue, 7 Feb 2017 03:45:53 -0500 Date: Tue, 7 Feb 2017 09:45:53 +0100 From: Peter Zijlstra To: Waiman Long Cc: Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/3] locking/spinlock_debug: Change it to a mostly fair lock Message-ID: <20170207084553.GW6500@twins.programming.kicks-ass.net> References: <1486044929-7244-1-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1486044929-7244-1-git-send-email-longman@redhat.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 02, 2017 at 09:15:26AM -0500, Waiman Long wrote: > v2->v3: > - Keep the original v1 patches but move patch 3 of v2 in front so > as to disable GENERIC_LOCKBREAK when DEBUG_LOCK_ALLOC is on. > > v1->v2: > - Pack lockup and break_lock into a single 4-byte slot so as not > to in increase spinlock size when GENERIC_LOCKBREAK is > on. Hopefully that will be enough to fix a frame size too large > warning in 0-day build. > - Add a new patch to disable GENERIC_LOCKBREAK when DEBUG_LOCK_ALLOC > is on. > > The current debug spinlock implementation is a TATAS unfair lock. This > can occasionally lead to system lockup with a debug kernel because > of the unfairness of the lock rather than inherent locking problem. > > This patch set changes the debug spinlock implementation to a > mostly fair spinlock based on the MCS lock similar to what is done > in qspinlock. It also includes a patch that disable GENERIC_LOCKBREAK > when DEBUG_LOCK_ALLOC is on. An alternative is to just delete the thing entirely.. Ingo, much of what this thing does seems to be superseded by both lockdep and a reliable NMI watchdog. Is there still value in spinlock_debug?