]> git.hungrycats.org Git - linux/commitdiff
zygo: config: enlarge the lockdep tables so it survives a long run
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sat, 22 Aug 2026 04:41:50 +0000 (00:41 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 18 Sep 2026 21:36:35 +0000 (17:36 -0400)
bhive's FAIL-role octopus soft-locked in the raid56 RMW park path after
8.5 hours, and the log had no lock-order report to go with it -- because
lockdep had switched itself off six minutes into the run:

    Aug 21 15:25:25  ... MAX_LOCKDEP_CHAINS:      65536
    Aug 21 15:31:56  BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!

MAX_LOCKDEP_CHAIN_HLOCKS is MAX_LOCKDEP_CHAINS * 5 and MAX_LOCKDEP_CHAINS
is 1 << CONFIG_LOCKDEP_CHAINS_BITS, so at the default 16 the whole
validation ran with 327680 chain-hlock slots.  Exhausting that array
disables lockdep permanently, which means every long run on this config
has been doing its real work -- the hours of degraded raid56, balance and
ENOSPC churn -- with no deadlock detection at all, while
CONFIG_PROVE_LOCKING=y in the config said otherwise.  A lock-order
inversion or a recursive acquisition in those hours would have gone
unreported, and quite possibly did: the lockup we did hit is a spinlock
that never came back, which is exactly what lockdep exists to name.

Raise the tables well past what this workload needs.  The distinct-chain
count is bounded by the code paths exercised, not by run length, so the
question is only whether the ceiling is above that bound; 6 minutes to
exhaustion says the old one was far below it.

    LOCKDEP_CHAINS_BITS      16 -> 20   (65536 -> 1048576 chains)
    LOCKDEP_BITS             15 -> 18   (32768 -> 262144 entries)
    LOCKDEP_STACK_TRACE_BITS 19 -> 21   (stack traces scale with chains)

Costs roughly 25MB of static tables on an 8-15GB test VM, which is a
trade worth making to stop running blind.

.config

diff --git a/.config b/.config
index 01d631935e9c09cb73098e005e914e927967e2a6..c4641f44411e1bdf24a38f5eb841f83c3e24694d 100644 (file)
--- a/.config
+++ b/.config
@@ -13585,9 +13585,9 @@ CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
 CONFIG_DEBUG_RWSEMS=y
 CONFIG_DEBUG_LOCK_ALLOC=y
 CONFIG_LOCKDEP=y
-CONFIG_LOCKDEP_BITS=15
-CONFIG_LOCKDEP_CHAINS_BITS=16
-CONFIG_LOCKDEP_STACK_TRACE_BITS=19
+CONFIG_LOCKDEP_BITS=18
+CONFIG_LOCKDEP_CHAINS_BITS=20
+CONFIG_LOCKDEP_STACK_TRACE_BITS=21
 CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14
 CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12
 CONFIG_DEBUG_LOCKDEP=y