linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] locking/lockdep: Reuse zapped chain_hlocks entries
@ 2019-12-16 15:15 Waiman Long
  2019-12-16 15:15 ` [PATCH v2 1/6] locking/lockdep: Track number of zapped classes Waiman Long
                   ` (6 more replies)
  0 siblings, 7 replies; 29+ messages in thread
From: Waiman Long @ 2019-12-16 15:15 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Will Deacon
  Cc: linux-kernel, Bart Van Assche, Waiman Long

 v2:
  - Revamp the chain_hlocks reuse patch to store the freed chain_hlocks
    information in the chain_hlocks entries themselves avoiding the
    need of a separate set of tracking structures. This, however,
    requires a minimum allocation size of at least 2. Thanks to PeterZ
    for his review and inspiring this change.
  - Remove the leakage counter as it is no longer applicable.
  - Add patch 6 to make the output of /proc/lockdep_chains more readable.

It was found that when running a workload that kept on adding lock
classes and then zapping them repetitively, the system will eventually
run out of chain_hlocks[] entries even though there were still plenty
of other lockdep data buffers available.

  [ 4318.443670] BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
  [ 4318.444809] turning off the locking correctness validator.

In order to fix this problem, we have to make chain_hlocks[] entries
reusable just like other lockdep arrays. Besides that, the patchset
also adds some zapped class and chain_hlocks counters to be tracked by
/proc/lockdep_stats. It also fixes leakage in the irq context counters
and makes the output of /proc/lockdep_chains more readable.

Waiman Long (6):
  locking/lockdep: Track number of zapped classes
  locking/lockdep: Throw away all lock chains with zapped class
  locking/lockdep: Track number of zapped lock chains
  locking/lockdep: Reuse freed chain_hlocks entries
  locking/lockdep: Decrement irq context counters when removing lock
    chain
  locking/lockdep: Display irq_context names in /proc/lockdep_chains

 kernel/locking/lockdep.c           | 307 +++++++++++++++++++++++------
 kernel/locking/lockdep_internals.h |  14 +-
 kernel/locking/lockdep_proc.c      |  26 ++-
 3 files changed, 282 insertions(+), 65 deletions(-)

-- 
2.18.1


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2020-01-15 19:26 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16 15:15 [PATCH v2 0/6] locking/lockdep: Reuse zapped chain_hlocks entries Waiman Long
2019-12-16 15:15 ` [PATCH v2 1/6] locking/lockdep: Track number of zapped classes Waiman Long
2020-01-13 14:55   ` Peter Zijlstra
2020-01-13 14:58     ` Waiman Long
2020-01-13 16:02       ` Bart Van Assche
2019-12-16 15:15 ` [PATCH v2 2/6] locking/lockdep: Throw away all lock chains with zapped class Waiman Long
2020-01-13 15:18   ` Peter Zijlstra
2020-01-13 15:44     ` Waiman Long
2020-01-13 16:05     ` Bart Van Assche
2020-01-13 16:15       ` Waiman Long
2019-12-16 15:15 ` [PATCH v2 3/6] locking/lockdep: Track number of zapped lock chains Waiman Long
2019-12-16 15:15 ` [PATCH v2 4/6] locking/lockdep: Reuse freed chain_hlocks entries Waiman Long
2020-01-13 15:51   ` Peter Zijlstra
2020-01-13 16:04     ` Waiman Long
2020-01-13 15:58   ` Peter Zijlstra
2020-01-13 16:24     ` Waiman Long
2020-01-14  9:46       ` Peter Zijlstra
2020-01-14 19:16         ` Waiman Long
2020-01-15 10:44           ` Peter Zijlstra
2020-01-15 19:26             ` Waiman Long
2020-01-13 15:59   ` Peter Zijlstra
2020-01-13 16:03     ` Waiman Long
2019-12-16 15:15 ` [PATCH v2 5/6] locking/lockdep: Decrement irq context counters when removing lock chain Waiman Long
2020-01-14  9:53   ` Peter Zijlstra
2020-01-14 15:04     ` Waiman Long
2019-12-16 15:15 ` [PATCH v2 6/6] locking/lockdep: Display irq_context names in /proc/lockdep_chains Waiman Long
2020-01-06 15:54 ` [PATCH v2 0/6] locking/lockdep: Reuse zapped chain_hlocks entries Waiman Long
2020-01-06 16:50   ` Peter Zijlstra
2020-01-06 16:52     ` Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).