Waiman Long
ef6eb81213
locking/lockdep: Decrement IRQ context counters when removing lock chain
...
[ Upstream commit b3b9c187dc2544923a601733a85352b9ddaba9b3 ]
There are currently three counters to track the IRQ context of a lock
chain - nr_hardirq_chains, nr_softirq_chains and nr_process_chains.
They are incremented when a new lock chain is added, but they are
not decremented when a lock chain is removed. That causes some of the
statistic counts reported by /proc/lockdep_stats to be incorrect.
IRQ
Fix that by decrementing the right counter when a lock chain is removed.
Since inc_chains() no longer accesses hardirq_context and softirq_context
directly, it is moved out from the CONFIG_TRACE_IRQFLAGS conditional
compilation block.
Fixes: a0b0fd53e1 ("locking/lockdep: Free lock classes that are no longer in use")
Signed-off-by: Waiman Long <[email protected] >
Signed-off-by: Peter Zijlstra (Intel) <[email protected] >
Signed-off-by: Ingo Molnar <[email protected] >
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Sasha Levin <[email protected] >
2020-10-01 13:17:33 +02:00
..
lock_events.c
locking/lock_events: Don't show pvqspinlock events on bare metal
2019-04-10 10:56:05 +02:00
lock_events.h
locking/lock_events: Use raw_cpu_{add,inc}() for stats
2019-06-03 12:32:56 +02:00
lock_events_list.h
locking/rwsem: Adaptive disabling of reader optimistic spinning
2019-06-17 12:28:09 +02:00
lockdep.c
locking/lockdep: Decrement IRQ context counters when removing lock chain
2020-10-01 13:17:33 +02:00
lockdep_internals.h
locking/lockdep: Decrement IRQ context counters when removing lock chain
2020-10-01 13:17:33 +02:00
lockdep_proc.c
locking/lockdep: Fix overflow in presentation of average lock-time
2020-09-03 11:26:47 +02:00
lockdep_states.h
locktorture.c
locktorture: Print ratio of acquisitions, not failures
2020-04-23 10:36:44 +02:00
Makefile
locking/rwsem: Merge rwsem.h and rwsem-xadd.c into rwsem.c
2019-06-17 12:27:57 +02:00
mcs_spinlock.h
locking/mcs: Use smp_cond_load_acquire() in MCS spin loop
2018-04-27 09:48:49 +02:00
mutex-debug.c
locking/mutex: Replace spin_is_locked() with lockdep
2018-11-12 09:06:22 -08:00
mutex-debug.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
mutex.c
mutex: Fix up mutex_waiter usage
2019-08-08 09:09:25 +02:00
mutex.h
mutex: Fix up mutex_waiter usage
2019-08-08 09:09:25 +02:00
osq_lock.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
percpu-rwsem.c
Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
2019-06-28 19:46:47 +02:00
qrwlock.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
2019-05-30 11:26:37 -07:00
qspinlock.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
2019-05-30 11:26:37 -07:00
qspinlock_paravirt.h
Revert "locking/pvqspinlock: Don't wait if vCPU is preempted"
2019-09-25 10:22:37 +02:00
qspinlock_stat.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
2019-05-30 11:26:37 -07:00
rtmutex-debug.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
rtmutex-debug.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
rtmutex.c
sched/core: Convert get_task_struct() to return the task
2019-07-25 15:51:54 +02:00
rtmutex.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
rtmutex_common.h
locking/rtmutex: Handle non enqueued waiters gracefully in remove_waiter()
2018-03-28 23:01:30 +02:00
rwsem.c
locking/rwsem: Fix kernel crash when spinning on RWSEM_OWNER_UNKNOWN
2020-01-23 08:22:37 +01:00
rwsem.h
locking/rwsem: Merge rwsem.h and rwsem-xadd.c into rwsem.c
2019-06-17 12:27:57 +02:00
semaphore.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 436
2019-06-05 17:37:17 +02:00
spinlock.c
asm-generic/mmiowb: Add generic implementation of mmiowb() tracking
2019-04-08 11:59:39 +01:00
spinlock_debug.c
locking/spinlock/debug: Fix various data races
2020-01-12 12:21:13 +01:00
test-ww_mutex.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 9
2019-05-21 11:28:40 +02:00