freebsd-skq/sys
rwatson cdd2c23d20 Clean up locking for the MAC Framework:
(1) Accept that we're now going to use mutexes, so don't attempt
    to avoid treating them as mutexes.  This cleans up locking
    accessor function names some.

(2) Rename variables to _mtx, _cv, _count, simplifying the naming.

(3) Add a new form of the _busy() primitive that conditionally
    makes the list busy: if there are entries on the list, bump
    the busy count.  If there are no entries, don't bump the busy
    count.  Return a boolean indicating whether or not the busy
    count was bumped.

(4) Break mac_policy_list into two lists: one with the same name
    holding dynamic policies, and a new list, mac_static_policy_list,
    which holds policies loaded before mac_late and without the
    unload flag set.  The static list may be accessed without
    holding the busy count, since it can't change at run-time.

(5) In general, prefer making the list busy conditionally, meaning
    we pay only one mutex lock per entry point if all modules are
    on the static list, rather than two (since we don't have to
    lower the busy count when we're done with the framework).  For
    systems running just Biba or MLS, this will halve the mutex
    accesses in the network stack, and may offer a substantial
    performance benefits.

(6) Lay the groundwork for a dynamic-free kernel option which
    eliminates all locking associated with dynamically loaded or
    unloaded policies, for pre-configured systems requiring
    maximum performance but less run-time flexibility.

These changes have been running for a few weeks on MAC development
branch systems.

Approved by:	re (jhb)
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-05-07 17:49:24 +00:00
..
alpha Style fixes. 2003-05-04 22:13:04 +00:00
amd64 Style nits. 2003-05-07 17:21:38 +00:00
arm Style fixes. 2003-05-04 22:13:04 +00:00
boot Since we insist on loading the POS ACPI by default, give the poor user 2003-05-05 07:33:12 +00:00
cam
coda
compat Change the semantics of sysv shm emulation to take a additional 2003-05-05 09:22:58 +00:00
conf We are now in 5.1-BETA 2003-05-06 03:55:24 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r114584, 2003-05-03 17:16:40 +00:00
crypto
ddb
dev Add PCI ID's for the Intel ICH5 (82801EB) chipset. 2003-05-06 19:31:56 +00:00
fs Clean up proc locking in procfs: make sure the proc lock is held before 2003-05-05 15:12:51 +00:00
geom Hide the "ENOMEM" notice messages behind bootverbose. They are still 2003-05-07 05:37:31 +00:00
gnu
i4b
i386 Style nits. 2003-05-07 17:21:38 +00:00
ia64 Style fixes. 2003-05-04 22:13:04 +00:00
isa
isofs/cd9660
kern Clean up locking for the MAC Framework: 2003-05-07 17:49:24 +00:00
libkern
modules
net Define a link layer MIB for ATM. Most fields of this MIB are needed by 2003-05-05 16:35:52 +00:00
netatalk
netatm
netgraph
netinet Correct a bug introduced with reduced TCP state handling; make 2003-05-07 05:26:27 +00:00
netinet6
netipsec Introduce an M_ASSERTPKTHDR() macro which performs the very common task 2003-04-08 14:25:47 +00:00
netipx
netkey
netnatm
netncp
netsmb
nfs
nfsclient
nfsserver
opencrypto
pc98
pccard
pci Don't call timeout() in sis_tick(), this is done earlier by mii_tick(), and it 2003-05-06 02:00:01 +00:00
posix4
powerpc Things run thru the C preprocessor must use C-style comments. 2003-05-05 10:01:10 +00:00
rpc
security Clean up locking for the MAC Framework: 2003-05-07 17:49:24 +00:00
sparc64 Style fixes. 2003-05-04 22:13:04 +00:00
sys #include <sys/resource.h> to limit ports damage. 2003-05-07 15:26:43 +00:00
tools
ufs Lock the vm_object on entry to vm_object_vndeallocate(). 2003-05-03 20:28:26 +00:00
vm Lock the vm_object when performing vm_pager_deallocate(). 2003-05-06 02:45:28 +00:00
Makefile