freebsd-dev/sys/vm
John Baldwin 91d5354a2c Locking for the per-process resource limits structure.
- struct plimit includes a mutex to protect a reference count.  The plimit
  structure is treated similarly to struct ucred in that is is always copy
  on write, so having a reference to a structure is sufficient to read from
  it without needing a further lock.
- The proc lock protects the p_limit pointer and must be held while reading
  limits from a process to keep the limit structure from changing out from
  under you while reading from it.
- Various global limits that are ints are not protected by a lock since
  int writes are atomic on all the archs we support and thus a lock
  wouldn't buy us anything.
- All accesses to individual resource limits from a process are abstracted
  behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return
  either an rlimit, or the current or max individual limit of the specified
  resource from a process.
- dosetrlimit() was renamed to kern_setrlimit() to match existing style of
  other similar syscall helper functions.
- The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit()
  (it didn't used the stackgap when it should have) but uses lim_rlimit()
  and kern_setrlimit() instead.
- The svr4 compat no longer uses the stackgap for resource limits calls,
  but uses lim_rlimit() and kern_setrlimit() instead.
- The ibcs2 compat no longer uses the stackgap for resource limits.  It
  also no longer uses the stackgap for accessing sysctl's for the
  ibcs2_sysconf() syscall but uses kernel_sysctl() instead.  As a result,
  ibcs2_sysconf() no longer needs Giant.
- The p_rlimit macro no longer exists.

Submitted by:	mtm (mostly, I only did a few cleanups and catchups)
Tested on:	i386
Compiled on:	alpha, amd64
2004-02-04 21:52:57 +00:00
..
default_pager.c Access the swap_pagers' ->putpages() through swappagerops instead 2003-08-06 12:05:48 +00:00
device_pager.c Simplify the various pager allocation routines by computing the desired 2004-01-04 20:55:15 +00:00
phys_pager.c Simplify the various pager allocation routines by computing the desired 2004-01-04 20:55:15 +00:00
pmap.h Move pmap_resident_count() from the MD pmap.h to the MI pmap.h. 2003-10-06 01:47:12 +00:00
swap_pager.c Check error return from g_clone_bio(). (netchild@) 2004-02-02 13:08:03 +00:00
swap_pager.h Staticize swap_pager_putpages() 2003-08-06 12:08:27 +00:00
uma_core.c - Fix a problem where we did not drain the cache of buckets in the zone 2004-02-01 06:15:17 +00:00
uma_dbg.c Provide a bit more help with "memory overwritten after free" style bugs. 2003-09-27 21:33:13 +00:00
uma_dbg.h - Use my freebsd email alias in the copyright. 2002-09-19 06:05:32 +00:00
uma_int.h Increase UMA_BOOT_PAGES because of changes to pv entry initialization in 2004-01-18 05:51:06 +00:00
uma.h - Fix the silly flag situation in UMA. Remove redundant ZFLAG/ZONE flags 2003-09-19 08:37:44 +00:00
vm_contig.c Remove vm_page_alloc_contig(). It's now unused. 2004-01-14 06:21:38 +00:00
vm_extern.h Remove vm_page_alloc_contig(). It's now unused. 2004-01-14 06:21:38 +00:00
vm_fault.c - Reduce Giant's scope in vm_fault(). 2003-12-26 23:33:37 +00:00
vm_glue.c Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
vm_init.c Change clean_map from a global to an auto variable 2003-09-01 16:46:47 +00:00
vm_kern.c Unmanage pages allocated by kmem_alloc(). (There is no point in having PV 2004-01-10 00:22:33 +00:00
vm_kern.h More pipe changes: 2003-08-11 05:51:51 +00:00
vm_map.c Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
vm_map.h - Rename vm_map_clean() to vm_map_sync(). This better reflects the fact 2003-11-09 05:25:35 +00:00
vm_meter.c Avoid lock-order reversal between the vm object list mutex and the vm 2004-01-02 19:38:25 +00:00
vm_mmap.c Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
vm_object.c Don't acquire Giant in vm_object_deallocate() unless the object is vnode- 2004-01-18 03:44:14 +00:00
vm_object.h - Rename vm_map_clean() to vm_map_sync(). This better reflects the fact 2003-11-09 05:25:35 +00:00
vm_page.c - Enable recursive acquisition of the mutex synchronizing access to the 2004-01-08 20:48:26 +00:00
vm_page.h - Align a comment within struct vm_page. 2003-10-25 18:33:04 +00:00
vm_pageout.c Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
vm_pageout.h - Increase the object lock's scope in vm_contig_launder() so that access 2003-10-18 21:09:21 +00:00
vm_pageq.c Expand inline the relevant parts of src/COPYRIGHT for Matt Dillon's 2003-08-12 23:24:05 +00:00
vm_pager.c - Remove comments referring to functions that no longer exist. 2003-10-20 05:16:27 +00:00
vm_pager.h - Push down Giant from vm_pageout() to vm_pageout_scan(), freeing 2003-10-24 06:43:04 +00:00
vm_param.h Rev 1.16 renamed VM_METER to VM_TOTAL. This is breaking 3rd-party apps. 2003-01-18 21:14:02 +00:00
vm_unix.c Locking for the per-process resource limits structure. 2004-02-04 21:52:57 +00:00
vm_zeroidle.c - Use a seperate startup function for the zeroidle kthread. Use this to 2004-02-02 07:51:03 +00:00
vm.h Change the way ELF coredumps are handled. Instead of unconditionally 2002-12-16 19:24:43 +00:00
vnode_pager.c Eliminate the acquisition and release of Giant from vnode_pager_alloc(). 2004-01-04 03:18:24 +00:00
vnode_pager.h