Paul E. McKenney
0c72ec11d8
locktorture: Print ratio of acquisitions, not failures
...
commit 80c503e0e68fbe271680ab48f0fe29bc034b01b7 upstream.
The __torture_print_stats() function in locktorture.c carefully
initializes local variable "min" to statp[0].n_lock_acquired, but
then compares it to statp[i].n_lock_fail. Given that the .n_lock_fail
field should normally be zero, and given the initialization, it seems
reasonable to display the maximum and minimum number acquisitions
instead of miscomputing the maximum and minimum number of failures.
This commit therefore switches from failures to acquisitions.
And this turns out to be not only a day-zero bug, but entirely my
own fault. I hate it when that happens!
Fixes: 0af3fe1efa ("locktorture: Add a lock-torture kernel module")
Reported-by: Will Deacon <will@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-23 10:36:44 +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: Avoid recursion in lockdep_count_{for,back}ward_deps()
2020-04-17 10:50:05 +02:00
lockdep_internals.h
locking/lockdep: Report more stack trace statistics
2019-07-25 15:43:28 +02:00
lockdep_proc.c
locking/lockdep: Fix lockdep_stats indentation problem
2020-03-05 16:43:51 +01: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