freebsd-skq/sys/vm
bmilekic f364d4ac36 Change and clean the mutex lock interface.
mtx_enter(lock, type) becomes:

mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks)
mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)

similarily, for releasing a lock, we now have:

mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN.
We change the caller interface for the two different types of locks
because the semantics are entirely different for each case, and this
makes it explicitly clear and, at the same time, it rids us of the
extra `type' argument.

The enter->lock and exit->unlock change has been made with the idea
that we're "locking data" and not "entering locked code" in mind.

Further, remove all additional "flags" previously passed to the
lock acquire/release routines with the exception of two:

MTX_QUIET and MTX_NOSWITCH

The functionality of these flags is preserved and they can be passed
to the lock/unlock routines by calling the corresponding wrappers:

mtx_{lock, unlock}_flags(lock, flag(s)) and
mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN
locks, respectively.

Re-inline some lock acq/rel code; in the sleep lock case, we only
inline the _obtain_lock()s in order to ensure that the inlined code
fits into a cache line. In the spin lock case, we inline recursion and
actually only perform a function call if we need to spin. This change
has been made with the idea that we generally tend to avoid spin locks
and that also the spin locks that we do have and are heavily used
(i.e. sched_lock) do recurse, and therefore in an effort to reduce
function call overhead for some architectures (such as alpha), we
inline recursion for this case.

Create a new malloc type for the witness code and retire from using
the M_DEV type. The new type is called M_WITNESS and is only declared
if WITNESS is enabled.

Begin cleaning up some machdep/mutex.h code - specifically updated the
"optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN
and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently
need those.

Finally, caught up to the interface changes in all sys code.

Contributors: jake, jhb, jasone (in no particular order)
2001-02-09 06:11:45 +00:00
..
default_pager.c - If swap metadata does not fit into the KVM, reduce the number of 2000-12-13 10:01:00 +00:00
device_pager.c Revert spelling mistake I made in the previous commit 2000-03-27 20:41:17 +00:00
phys_pager.c Really fix phys_pager: 2000-12-06 21:52:23 +00:00
pmap.h Implement write combining for crashdumps. This is useful when 2000-10-17 10:05:49 +00:00
swap_pager.c - If swap metadata does not fit into the KVM, reduce the number of 2000-12-13 10:01:00 +00:00
swap_pager.h - If swap metadata does not fit into the KVM, reduce the number of 2000-12-13 10:01:00 +00:00
vm_extern.h Remove unused 3rd argument from vsunlock() which abused B_WRITE. 2000-03-13 10:47:24 +00:00
vm_fault.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
vm_glue.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
vm_init.c Add missing include. 2001-01-24 06:54:24 +00:00
vm_kern.c Add mtx_assert()'s to verify that kmem_alloc() and kmem_free() are called 2001-01-24 11:27:29 +00:00
vm_kern.h Fix null-pointer dereference crash when the system is intentionally 2000-02-16 21:11:33 +00:00
vm_map.c This commit represents work mainly submitted by Tor and slightly modified 2001-02-04 06:19:28 +00:00
vm_map.h Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
vm_meter.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
vm_mmap.c This patchset fixes a large number of file descriptor race conditions. 2000-11-18 21:01:04 +00:00
vm_object.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
vm_object.h Make the arguments match the functionality of the functions. 2000-08-26 04:51:39 +00:00
vm_page.c This implements a better launder limiting solution. There was a solution 2000-12-26 19:41:38 +00:00
vm_page.h This implements a better launder limiting solution. There was a solution 2000-12-26 19:41:38 +00:00
vm_pageout.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
vm_pageout.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
vm_pager.c Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
vm_pager.h Back out the previous change to the queue(3) interface. 2000-05-26 02:09:24 +00:00
vm_param.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
vm_swap.c - If swap metadata does not fit into the KVM, reduce the number of 2000-12-13 10:01:00 +00:00
vm_unix.c If a process is over its resource limit for datasize, still allow 2000-10-06 13:03:50 +00:00
vm_zone.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
vm_zone.h Give this code a major facelift: 2001-01-22 07:01:50 +00:00
vm.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
vnode_pager.c This implements a better launder limiting solution. There was a solution 2000-12-26 19:41:38 +00:00
vnode_pager.h Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00