- Witness doesn't verify the old MTX_NOSWITCH flag's correctness (that was obsoleted
when critical sections were added). Instead, list a check that witness does perform. - Note that 'show locks' in DDB takes an optional thread argument. - Document 'show all locks'. - Remove the BUGS section, the bug in question was fixed 11 years ago in r76272.
This commit is contained in:
parent
d83c17fc0d
commit
1b5ba09fbb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=236334
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd February 18, 2001
|
.Dd May 30, 2012
|
||||||
.Dt WITNESS 4
|
.Dt WITNESS 4
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -52,11 +52,8 @@ violation occurs.
|
|||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
code also checks various other conditions such as verifying that one
|
code also checks various other conditions such as verifying that one
|
||||||
does not recurse on a non-recursive lock.
|
does not recurse on a non-recursive lock,
|
||||||
For sleep locks,
|
or attempt an upgrade on a shared lock held by another thread.
|
||||||
.Nm
|
|
||||||
verifies that a new process would not be switched to when a lock is released
|
|
||||||
or a lock is blocked on during an acquire while any spin locks are held.
|
|
||||||
If any of these checks fail, then the kernel will panic.
|
If any of these checks fail, then the kernel will panic.
|
||||||
.Pp
|
.Pp
|
||||||
The flag that controls whether or not the kernel debugger is entered when a
|
The flag that controls whether or not the kernel debugger is entered when a
|
||||||
@ -97,7 +94,7 @@ specifies the level of witness involvement in the system.
|
|||||||
A value of 1 specifies that witness is enabled.
|
A value of 1 specifies that witness is enabled.
|
||||||
A value of 0 specifies that witness is disabled, but that can be enabled
|
A value of 0 specifies that witness is disabled, but that can be enabled
|
||||||
again. This will maintain a small amount of overhead in the system.
|
again. This will maintain a small amount of overhead in the system.
|
||||||
A value of -1 specifies that witness is disabled permanently and that
|
A value of -1 specifies that witness is disabled permanently and
|
||||||
cannot be enabled again.
|
cannot be enabled again.
|
||||||
The sysctl
|
The sysctl
|
||||||
.Va debug.witness.watch
|
.Va debug.witness.watch
|
||||||
@ -114,10 +111,22 @@ and
|
|||||||
.Xr ddb 4
|
.Xr ddb 4
|
||||||
are compiled into the kernel:
|
are compiled into the kernel:
|
||||||
.Bl -ohang
|
.Bl -ohang
|
||||||
.It Ic show locks
|
.It Ic show locks Op thread
|
||||||
Outputs the list of locks held by the current thread to the kernel console
|
Outputs the list of locks held by a thread to the kernel console
|
||||||
along with the filename and line number at which each lock was last acquired
|
along with the filename and line number at which each lock was last acquired
|
||||||
by this thread.
|
by the thread.
|
||||||
|
The optional
|
||||||
|
.Ar thread
|
||||||
|
argument may be either a TID,
|
||||||
|
PID,
|
||||||
|
or pointer to a thread structure.
|
||||||
|
If
|
||||||
|
.Ar thread
|
||||||
|
is not specified,
|
||||||
|
then the locks held by the current thread are displayed.
|
||||||
|
.It Ic show all locks
|
||||||
|
Outputs the list of locks held by all threads in the system to the
|
||||||
|
kernel console.
|
||||||
.It Ic show witness
|
.It Ic show witness
|
||||||
Dump the current order list to the kernel console.
|
Dump the current order list to the kernel console.
|
||||||
The code first displays the lock order tree for all of the sleep locks.
|
The code first displays the lock order tree for all of the sleep locks.
|
||||||
@ -136,9 +145,3 @@ code first appeared in
|
|||||||
.Bsx 5.0
|
.Bsx 5.0
|
||||||
and was imported from there into
|
and was imported from there into
|
||||||
.Fx 5.0 .
|
.Fx 5.0 .
|
||||||
.Sh BUGS
|
|
||||||
The
|
|
||||||
.Nm
|
|
||||||
code currently does not handle recursion of shared
|
|
||||||
.Xr sx 9
|
|
||||||
locks properly.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user