From: Ingo Molnar <mingo@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Waiman Long <longman@redhat.com>, Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Andrew Morton <akpm@linux-foundation.org>,
"Paul E. McKenney" <paulmck@us.ibm.com>
Subject: Re: [PATCH v3 0/3] locking/spinlock_debug: Change it to a mostly fair lock
Date: Tue, 7 Feb 2017 10:48:16 +0100 [thread overview]
Message-ID: <20170207094816.GC9829@gmail.com> (raw)
In-Reply-To: <20170207084553.GW6500@twins.programming.kicks-ass.net>
* Peter Zijlstra <peterz@infradead.org> wrote:
> 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?
So there's still early stages when the NMI watchdog is not running, and
spinlock-debug can detect lockups in raw locks that lockdep does not cover, right?
But yeah ... it would simplify things all around, so I'm not unsympathetic to the
idea...
I've Cc:-ed a few other locking gents.
Thanks,
Ingo
next prev parent reply other threads:[~2017-02-07 9:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 14:15 [PATCH v3 0/3] locking/spinlock_debug: Change it to a mostly fair lock Waiman Long
2017-02-02 14:15 ` [PATCH v3 1/3] locking/spinlock: Disable GENERIC_LOCKBREAK when DEBUG_LOCK_ALLOC is on Waiman Long
2017-02-02 14:15 ` [PATCH v3 2/3] locking/spinlock_debug: Reduce lockup suspected message clutter Waiman Long
2017-02-02 14:15 ` [PATCH v3 3/3] locking/spinlock_debug: Reduce lock cacheline contention Waiman Long
2017-02-07 8:45 ` [PATCH v3 0/3] locking/spinlock_debug: Change it to a mostly fair lock Peter Zijlstra
2017-02-07 9:48 ` Ingo Molnar [this message]
2017-02-07 19:46 ` Waiman Long
2017-02-07 19:53 ` Paul E. McKenney
2017-02-08 9:27 ` Peter Zijlstra
2017-02-08 13:02 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170207094816.GC9829@gmail.com \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=paulmck@us.ibm.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox