freebsd-skq/sys
John Baldwin 192846463a Rework the witness code to work with sx locks as well as mutexes.
- Introduce lock classes and lock objects.  Each lock class specifies a
  name and set of flags (or properties) shared by all locks of a given
  type.  Currently there are three lock classes: spin mutexes, sleep
  mutexes, and sx locks.  A lock object specifies properties of an
  additional lock along with a lock name and all of the extra stuff needed
  to make witness work with a given lock.  This abstract lock stuff is
  defined in sys/lock.h.  The lockmgr constants, types, and prototypes have
  been moved to sys/lockmgr.h.  For temporary backwards compatability,
  sys/lock.h includes sys/lockmgr.h.
- Replace proc->p_spinlocks with a per-CPU list, PCPU(spinlocks), of spin
  locks held.  By making this per-cpu, we do not have to jump through
  magic hoops to deal with sched_lock changing ownership during context
  switches.
- Replace proc->p_heldmtx, formerly a list of held sleep mutexes, with
  proc->p_sleeplocks, which is a list of held sleep locks including sleep
  mutexes and sx locks.
- Add helper macros for logging lock events via the KTR_LOCK KTR logging
  level so that the log messages are consistent.
- Add some new flags that can be passed to mtx_init():
  - MTX_NOWITNESS - specifies that this lock should be ignored by witness.
    This is used for the mutex that blocks a sx lock for example.
  - MTX_QUIET - this is not new, but you can pass this to mtx_init() now
    and no events will be logged for this lock, so that one doesn't have
    to change all the individual mtx_lock/unlock() operations.
- All lock objects maintain an initialized flag.  Use this flag to export
  a mtx_initialized() macro that can be safely called from drivers.  Also,
  we on longer walk the all_mtx list if MUTEX_DEBUG is defined as witness
  performs the corresponding checks using the initialized flag.
- The lock order reversal messages have been improved to output slightly
  more accurate file and line numbers.
2001-03-28 09:03:24 +00:00
..
alpha Rework the witness code to work with sx locks as well as mutexes. 2001-03-28 09:03:24 +00:00
amd64 Rework the witness code to work with sx locks as well as mutexes. 2001-03-28 09:03:24 +00:00
arm/include Correct disordering which is corresponding to bde's fix to 2001-02-17 14:51:11 +00:00
boot MAN[1-9] -> MAN. 2001-03-27 11:59:22 +00:00
cam Last commit was broken.. It always prints '[CTRL-C to abort]'. 2001-03-28 01:37:29 +00:00
coda Send the remains (such as I have located) of "block major numbers" to 2001-03-26 12:41:29 +00:00
compat fix linux_times() to take into account linux's value of CLK_TCK on the alpha. 2001-03-23 19:22:21 +00:00
compile
conf Rework the witness code to work with sx locks as well as mutexes. 2001-03-28 09:03:24 +00:00
contrib/dev Send the remains (such as I have located) of "block major numbers" to 2001-03-26 12:41:29 +00:00
crypto Kernel crypto need binary key material, not symbolic ascii. 2001-03-10 13:02:58 +00:00
ddb Use macro API for <sys/queue.h> 2000-12-30 22:06:19 +00:00
dev Back out previous commit until I figure out a way to do it properly. 2001-03-28 07:01:45 +00:00
fs Send the remains (such as I have located) of "block major numbers" to 2001-03-26 12:41:29 +00:00
geom Send the remains (such as I have located) of "block major numbers" to 2001-03-26 12:41:29 +00:00
gnu Fixes to track snapshot copy-on-write checking in the specinfo 2001-03-07 07:09:55 +00:00
i4b Send the remains (such as I have located) of "block major numbers" to 2001-03-26 12:41:29 +00:00
i386 Rework the witness code to work with sx locks as well as mutexes. 2001-03-28 09:03:24 +00:00
ia64 Rework the witness code to work with sx locks as well as mutexes. 2001-03-28 09:03:24 +00:00
isa Send the remains (such as I have located) of "block major numbers" to 2001-03-26 12:41:29 +00:00
isofs/cd9660 Add missed MODULE_VERSION() call, so loading of unicode conversion routine 2001-03-11 15:28:42 +00:00
kern Rework the witness code to work with sx locks as well as mutexes. 2001-03-28 09:03:24 +00:00
libkern Rewrite of the CAM error recovery code. 2001-03-27 05:45:52 +00:00
miscfs o Change the API and ABI of the Extended Attribute kernel interfaces to 2001-03-15 02:54:29 +00:00
modules Remove NOMAN 2001-03-27 19:04:09 +00:00
msdosfs Grab the process lock while calling psignal and before calling psignal. 2001-03-07 03:37:06 +00:00
net Don't bypass notifying a corresponding interface 2001-03-27 13:15:57 +00:00
netatalk Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
netatm Silence some warnings 2001-03-20 10:42:49 +00:00
netgraph netgraph.h: 2001-03-10 16:31:00 +00:00
netinet MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
netinet6 nuke IPSEC_SRCSEL which does not do the right thing. 2001-03-16 17:52:48 +00:00
netipx Another round of the <sys/queue.h> FOREACH transmogriffer. 2001-02-04 16:08:18 +00:00
netkey fixed possibility of panic at key_acquire(). 2001-01-14 17:25:08 +00:00
netnatm Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
netncp Move bindery authentication ncps to ncp_ncp.c file. ncp_login.c will stay 2001-03-22 10:38:16 +00:00
netns * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT. 2000-12-21 21:44:31 +00:00
nfs Use the same API as the example code. 2001-03-20 02:10:18 +00:00
nfsclient Use the same API as the example code. 2001-03-20 02:10:18 +00:00
nfsserver Use a generic implementation of the Fowler/Noll/Vo hash (FNV hash). 2001-03-17 09:31:06 +00:00
ntfs Reviewed by: jlemon 2001-03-01 21:00:17 +00:00
nwfs Add dependancy on libmchain module. 2001-03-22 06:51:53 +00:00
pc98 Switch from save/disable/restore_intr() to critical_enter/exit(). 2001-03-28 03:06:10 +00:00
pccard Send the remains (such as I have located) of "block major numbers" to 2001-03-26 12:41:29 +00:00
pci Send the remains (such as I have located) of "block major numbers" to 2001-03-26 12:41:29 +00:00
posix4 Lock need_resched with sched_lock. 2001-02-22 13:46:09 +00:00
powerpc Rework the witness code to work with sx locks as well as mutexes. 2001-03-28 09:03:24 +00:00
rpc Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and 2001-03-19 12:50:13 +00:00
svr4 This patchset fixes a large number of file descriptor race conditions. 2000-11-18 21:01:04 +00:00
sys Rework the witness code to work with sx locks as well as mutexes. 2001-03-28 09:03:24 +00:00
tools replace calls to non-existant bail() subroutine with calls to 2001-03-23 11:48:50 +00:00
ufs Introduce support for POSIX.1e ACLs on UFS-based file systems. This 2001-03-26 17:53:19 +00:00
vm Export intrnames and intrcnt as sysctls (hw.nintr, hw.intrnames and 2001-03-23 03:45:17 +00:00
Makefile