| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok visa@
|
|
|
|
| |
ok gnezdo@ semarie@ mpi@
|
|
|
|
|
| |
We did not reach a consensus about using SMR to unlock single_thread_set()
so there's no point in keeping this change.
|
|
|
|
|
|
| |
This makes it clearer why lock order traces are sometimes not displayed.
Prompted by a question from, and OK anton@
|
|
|
|
|
|
| |
Makes previously explicit checking less verbose.
OK millert@
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Currently all iterations are done under KERNEL_LOCK() and therefor use
the *_LOCKED() variant.
From and ok claudio@
|
|
|
|
| |
ok visa@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The allocating of lock stacks does not handle correctly the case where
the system-wide free list becomes empty. Consequently, the returned
stack buffer can still be on the CPU's free list.
This patch fixes the bug by simplifying the code. Lock stack buffers are
now allocated and freed one by one from the system-wide free list
instead of using batching.
The fix additionally addresses a buffer hoarding problem that can arise
under workloads where some CPUs are net acquirers and some other CPUs
net releasers of rwlocks.
Panic reported by Hrvoje Popovski
|
|
|
|
|
|
|
|
|
|
| |
require the debugger on most architectures, and the separation makes the
code easier to use from other subsystems.
The function definitions are still conditional to DDB. However, that
should not matter for now.
OK deraadt@, mpi@
|
| |
|
|
|
|
|
|
| |
From Christian Ludwig <christian_ludwig at genua dot de>
ok visa@
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reduce code clutter by removing the file name and line number output
from witness(4). Typically it is easy enough to locate offending locks
using the stack traces that are shown in lock order conflict reports.
Tricky cases can be tracked using sysctl kern.witness.locktrace=1 .
This patch additionally removes the witness(4) wrapper for mutexes.
Now each mutex implementation has to invoke the WITNESS_*() macros
in order to utilize the checker.
Discussed with and OK dlg@, OK mpi@
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This lets witness(4) save a stack trace on each lock acquisition.
The saved traces can be viewed in ddb(4) when showing the currently
held locks, which may help when debugging incorrect locking.
Sample output:
ddb{0}> show all locks
Process 63836 (rm) thread 0xffff8000221e52c8 (435004)
exclusive rrwlock inode r = 0 (0xfffffd8119a092c0) locked @ /usr/src/sys/ufs/ufs/ufs_vnops.c:1547
#0 witness_lock+0x419
#1 _rw_enter+0x2bb
#2 _rrw_enter+0x42
#3 VOP_LOCK+0x3f
#4 vn_lock+0x36
#5 vfs_lookup+0xa1
#6 namei+0x2b3
#7 dounlinkat+0x85
#8 syscall+0x338
#9 Xsyscall+0x128
exclusive kernel_lock &kernel_lock r = 1 (0xffffffff81e6a5f0) locked @ /usr/src/sys/arch/amd64/amd64/intr.c:525
#0 witness_lock+0x419
#1 syscall+0x2b6
#2 Xsyscall+0x128
The saving adds overhead, so it is not enabled by default. It can be
taken into use by setting sysctl kern.witness.locktrace=1 at runtime
or by defining WITNESS_LOCKTRACE in the kernel configuration.
Feedback and OK anton@
|
|
|
|
|
|
|
| |
the system priority level to IPL_HIGH. This simplifies the code a bit
relative to calling from witness_lock() and witness_unlock().
OK mpi@
|
|
|
|
|
|
|
|
| |
The new node contains the subsystem's main control variable,
kern.witness.watch. It is aliased by the old name, kern.witnesswatch.
The alias will be removed in the future.
OK anton@ mpi@
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This eases data extraction in syzkaller.
Prompted by and OK anton@
|
|
|
|
|
|
| |
This reduces the contention of the `w_mtx' lock.
OK mpi@
|
|
|
|
| |
OK mpi@
|
|
|
|
|
| |
From Christian Ludwig
OK mpi@
|
|
|
|
| |
ok visa@
|
|
|
|
|
|
| |
in ddb. This avoids invoking the output pager by accident and keeps
the output somewhat readable in case multiple cores trigger a warning
simultaneously.
|
|
|
|
| |
Requested by deraadt@
|
| |
|
|
|
|
| |
OK mpi@
|
|
|
|
|
|
|
| |
lock order checking is disabled but it can be enabled at runtime.
Suggested by deraadt@ / mpi@
OK mpi@
|
|
|
|
|
|
| |
to simplify the code.
OK mpi@
|
| |
|
|
|
|
|
|
| |
and indicate if a saved stack trace is empty.
OK guenther@
|
|
|
|
| |
if the lock becomes watched later.
|
| |
|
|
|
|
|
|
| |
by my mistake.
Pointed out by Christian Ludwig. Thank you!
|
|
|
|
|
|
|
| |
Prevents witness(4) from panic'ing the kernel now that mutexes and rwlock
are always "taken" while in ddb(4).
ok visa@
|
|
|
|
|
|
| |
to sleeplocks.
OK mpi@
|
|
|
|
|
|
|
| |
so that statically initialized locks get properly enrolled
to the validator.
OK mpi@
|
|
|
|
| |
ok mpi@ deraadt@
|
| |
|
|
|
|
|
|
|
| |
Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.
ok deraadt@, kettenis@, visa@
|
|
Go-ahead from kettenis@, guenther@, deraadt@
|