[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190730120321.193069837@linutronix.de>
Date: Tue, 30 Jul 2019 13:24:53 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Sebastian Siewior <bigeasy@...utronix.de>,
Anna-Maria Gleixner <anna-maria@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
Julia Cartwright <julia@...com>,
"Theodore Tso" <tytso@....edu>,
Matthew Wilcox <willy@...radead.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
Jan Kara <jack@...e.com>
Subject: [patch 1/4] locking/lockdep: Add Kconfig option for bit spinlocks
Some usage sites of bit spinlocks have a substitution with regular
spinlocks which depends on CONFIG_PREEMPT_RT. But this substitution can
also be used to expose these locks to the regular lock debugging
infrastructure, e.g. lockdep.
As this increases the size of affected data structures significantly this
is guarded by a separate Kconfig switch.
Note, that only the bit spinlocks which have a substitution implemented
will be covered by this. All other bit spinlocks evade lock debugging as
before.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
lib/Kconfig.debug | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1201,6 +1201,16 @@ config DEBUG_RWSEMS
This debugging feature allows mismatched rw semaphore locks
and unlocks to be detected and reported.
+config DEBUG_BIT_SPINLOCKS
+ bool "Bit spinlock debugging"
+ depends on DEBUG_SPINLOCK
+ help
+ This debugging feature substitutes bit spinlocks in some use
+ cases, e.g. buffer head, zram, with with regular spinlocks so
+ these locks are exposed to lock debugging features.
+
+ Not all bit spinlocks are covered by this.
+
config DEBUG_LOCK_ALLOC
bool "Lock debugging: detect incorrect freeing of live locks"
depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
Powered by blists - more mailing lists