|author||Ingo Molnar <firstname.lastname@example.org>||2017-12-12 12:31:16 +0100|
|committer||Ingo Molnar <email@example.com>||2017-12-12 12:38:51 +0100|
locking/lockdep: Remove the cross-release locking checks
This code (CONFIG_LOCKDEP_CROSSRELEASE=y and CONFIG_LOCKDEP_COMPLETIONS=y), while it found a number of old bugs initially, was also causing too many false positives that caused people to disable lockdep - which is arguably a worse overall outcome. If we disable cross-release by default but keep the code upstream then in practice the most likely outcome is that we'll allow the situation to degrade gradually, by allowing entropy to introduce more and more false positives, until it overwhelms maintenance capacity. Another bad side effect was that people were trying to work around the false positives by uglifying/complicating unrelated code. There's a marked difference between annotating locking operations and uglifying good code just due to bad lock debugging code ... This gradual decrease in quality happened to a number of debugging facilities in the kernel, and lockdep is pretty complex already, so we cannot risk this outcome. Either cross-release checking can be done right with no false positives, or it should not be included in the upstream kernel. ( Note that it might make sense to maintain it out of tree and go through the false positives every now and then and see whether new bugs were introduced. ) Cc: Byungchul Park <firstname.lastname@example.org> Cc: Linus Torvalds <email@example.com> Cc: Peter Zijlstra <firstname.lastname@example.org> Cc: Thomas Gleixner <email@example.com> Cc: firstname.lastname@example.org Signed-off-by: Ingo Molnar <email@example.com>
Diffstat (limited to 'lib')
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 947d3e2ed5c2..9d5b78aad4c5 100644
@@ -1099,8 +1099,6 @@ config PROVE_LOCKING
select DEBUG_RT_MUTEXES if RT_MUTEXES
- select LOCKDEP_CROSSRELEASE
- select LOCKDEP_COMPLETIONS
@@ -1170,37 +1168,6 @@ config LOCK_STAT
CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
(CONFIG_LOCKDEP defines "acquire" and "release" events.)
- This makes lockdep work for crosslock which is a lock allowed to
- be released in a different context from the acquisition context.
- Normally a lock must be released in the context acquiring the lock.
- However, relexing this constraint helps synchronization primitives
- such as page locks or completions can use the lock correctness
- detector, lockdep.
- A deadlock caused by wait_for_completion() and complete() can be
- detected by lockdep using crossrelease feature.
- bool "Enable the boot parameter, crossrelease_fullstack"
- depends on LOCKDEP_CROSSRELEASE
- default n
- The lockdep "cross-release" feature needs to record stack traces
- (of calling functions) for all acquisitions, for eventual later
- use during analysis. By default only a single caller is recorded,
- because the unwind operation can be very expensive with deeper
- stack chains.
- However a boot parameter, crossrelease_fullstack, was
- introduced since sometimes deeper traces are required for full
- analysis. This option turns on the boot parameter.
bool "Lock dependency engine debugging"
depends on DEBUG_KERNEL && LOCKDEP