locking/lockdep: Reuse zapped chain_hlocks entries
Status from this message: The following commit has been merged into the locking/core branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest6 patches 5 repliesApplied
- v57 patches 16 repliesSuperseded
- v47 patches 0 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 8 patches | 4 replies | Superseded | |
| v2 | 6 patches | 22 replies | Superseded | |
| v1 | 5 patches | 10 replies | Superseded |
Changes in v6 from the cover letter
- Drop patch 7 for now.
- Incorporate further changes as suggested by PeterZ.
- Increase MAX_CHAIN_BUCKETS to 16 to further minimize the possibility of having more than one chain block in bucket 0.
Patches in v6 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | locking/lockdep: Decrement irq context counters when removing lock chainkernel/ kernel/ | +29 | 0 replies | |
| 2/6 | locking/lockdep: Display irq_context names in /proc/lockdep_chainskernel/ | +8 | 0 replies | |
| 3/6 | locking/lockdep: Track number of zapped classeskernel/ kernel/ kernel/ | +9 | 0 replies | |
| 4/6 | locking/lockdep: Throw away all lock chains with zapped classkernel/ kernel/ kernel/ | +7 | 0 replies | |
| 5/6 | locking/lockdep: Track number of zapped lock chainskernel/ kernel/ kernel/ | +7 | 0 replies | |
| 6/6 | locking/lockdep: Reuse freed chain_hlocks entrieskernel/ kernel/ kernel/ | +256 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.
Cover letter [PATCH v6 0/6] locking/lockdep: Reuse zapped chain_hlocks entries
v6:
- Drop patch 7 for now.
- Incorporate further changes as suggested by PeterZ.
- Increase MAX_CHAIN_BUCKETS to 16 to further minimize the possibility of having more than one chain block in bucket 0.
v5:
- Fix more build errors reported by kbuild test robot.
v4:
- Fix build errors reported by kbuild test robot.
- Adopt the single chain block allocator code suggested by PeterZ which combine the last 3 patches of v3 series.
- Add another patch to introduce a fast path in the chain block allocator.
- In patch 1, move the inc_chains() out of CONFIG_TRACE_IRQFLAGS conditional compilation block.
v3:
- Move the bug fix patches to the beginning of the series.
- Include a number of changes as suggested by PeterZ.
- Increase MAX_CHAIN_BUCKETS from 8 to 10 to reduce the chance of using the unsized list.
- Add patch 7 to add a lockdep_early_init() call.
- Add patch 8 to allocate chain hlocks by splitting large chain block as a last resort.
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: Decrement irq context counters when removing lock
chain
locking/lockdep: Display irq_context names in /proc/lockdep_chains 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
kernel/locking/lockdep.c | 332 ++++++++++++++++++++++++----- kernel/locking/lockdep_internals.h | 14 +- kernel/locking/lockdep_proc.c | 31 ++- 3 files changed, 312 insertions(+), 65 deletions(-)
Signature · 1 line
2.18.1