[PATCH v6 07/15] lockdep: Avoid adding redundant direct links of crosslocks

From: Byungchul Park
Date: Tue Mar 14 2017 - 04:27:02 EST


On my machine (QEMU x86_64, 4 core, mem 512M, enable-kvm), this patch
does not make different between before/after in lockdep_stats. So this
patch looks unnecessary. However, I wonder if it's still true in other
systems. Could anybody check lockdep_stats in your system?

Before (apply all crossrelease patches except this patch):

lock-classes: 988 [max: 8191]
direct dependencies: 5814 [max: 32768]
indirect dependencies: 18915
all direct dependencies: 119802
dependency chains: 6350 [max: 65536]
dependency chain hlocks: 20771 [max: 327680]
in-hardirq chains: 52
in-softirq chains: 361
in-process chains: 5937
stack-trace entries: 80396 [max: 524288]
combined max dependencies: 113926468
hardirq-safe locks: 42
hardirq-unsafe locks: 644
softirq-safe locks: 129
softirq-unsafe locks: 561
irq-safe locks: 135
irq-unsafe locks: 644
hardirq-read-safe locks: 2
hardirq-read-unsafe locks: 127
softirq-read-safe locks: 11
softirq-read-unsafe locks: 119
irq-read-safe locks: 12
irq-read-unsafe locks: 127
uncategorized locks: 165
unused locks: 1
max locking depth: 14
max bfs queue depth: 168
debug_locks: 1

After (apply all crossrelease patches without exception):

lock-classes: 980 [max: 8191]
direct dependencies: 5604 [max: 32768]
indirect dependencies: 18517
all direct dependencies: 112620
dependency chains: 6215 [max: 65536]
dependency chain hlocks: 20401 [max: 327680]
in-hardirq chains: 51
in-softirq chains: 298
in-process chains: 5866
stack-trace entries: 78707 [max: 524288]
combined max dependencies: 91220116
hardirq-safe locks: 42
hardirq-unsafe locks: 637
softirq-safe locks: 117
softirq-unsafe locks: 561
irq-safe locks: 126
irq-unsafe locks: 637
hardirq-read-safe locks: 2
hardirq-read-unsafe locks: 127
softirq-read-safe locks: 10
softirq-read-unsafe locks: 119
irq-read-safe locks: 11
irq-read-unsafe locks: 127
uncategorized locks: 165
unused locks: 1
max locking depth: 15
max bfs queue depth: 168
debug_locks: 1

-----8<-----