freebsd-skq/sys/vm
Konstantin Belousov 3364c323e6 Implement global and per-uid accounting of the anonymous memory. Add
rlimit RLIMIT_SWAP that limits the amount of swap that may be reserved
for the uid.

The accounting information (charge) is associated with either map entry,
or vm object backing the entry, assuming the object is the first one
in the shadow chain and entry does not require COW. Charge is moved
from entry to object on allocation of the object, e.g. during the mmap,
assuming the object is allocated, or on the first page fault on the
entry. It moves back to the entry on forks due to COW setup.

The per-entry granularity of accounting makes the charge process fair
for processes that change uid during lifetime, and decrements charge
for proper uid when region is unmapped.

The interface of vm_pager_allocate(9) is extended by adding struct ucred *,
that is used to charge appropriate uid when allocation if performed by
kernel, e.g. md(4).

Several syscalls, among them is fork(2), may now return ENOMEM when
global or per-uid limits are enforced.

In collaboration with:	pho
Reviewed by:	alc
Approved by:	re (kensmith)
2009-06-23 20:45:22 +00:00
..
default_pager.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
device_pager.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
memguard.c Provide the new argument to kmem_suballoc(). 2008-05-10 23:39:27 +00:00
memguard.h
phys_pager.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
pmap.h Retire pmap_addr_hint(). It is no longer used. 2008-05-18 04:16:57 +00:00
redzone.c Fix REDZONE(9) on amd64 and perhaps other 64 bit targets -- ensure the space 2008-08-13 17:32:48 +00:00
redzone.h
swap_pager.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
swap_pager.h - Move 'struct swdevt' back into swap_pager.h and expose it to userland. 2007-02-07 17:43:11 +00:00
uma_core.c Add support for UMA_SLAB_KERNEL to page_free(). (While I'm here remove an 2009-06-18 07:27:11 +00:00
uma_dbg.c - Make the keg abstraction more complete. Permit a zone to have multiple 2009-01-25 09:11:24 +00:00
uma_dbg.h
uma_int.h - Make the keg abstraction more complete. Permit a zone to have multiple 2009-01-25 09:11:24 +00:00
uma.h - Make the keg abstraction more complete. Permit a zone to have multiple 2009-01-25 09:11:24 +00:00
vm_contig.c Refactor contigmalloc() into two functions: a simple front-end that deals 2009-06-17 17:19:48 +00:00
vm_extern.h Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_fault.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_glue.c Eliminate unnecessary obfuscation when testing a page's valid bits. 2009-06-07 19:38:26 +00:00
vm_init.c Adjust some variables (mostly related to the buffer cache) that hold 2009-03-09 19:35:20 +00:00
vm_kern.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_kern.h Enable the creation of a kmem map larger than 4GB. 2008-07-05 19:34:33 +00:00
vm_map.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_map.h Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_meter.c - Mark all standalone INT/LONG/QUAD sysctl's MPSAFE. This is done 2009-01-23 22:49:23 +00:00
vm_mmap.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_object.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_object.h Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_page.c Strive for greater consistency among the places that implement real, 2009-06-21 00:21:33 +00:00
vm_page.h Eliminate a stale comment and the two remaining uses of the "register" 2009-05-30 22:15:55 +00:00
vm_pageout.c Revise vm_pageout_scan()'s handling of partially dirty pages. Specifically, 2009-05-28 06:52:14 +00:00
vm_pageout.h Move the code for doing out-of-memory grass from vm_pageout_scan() 2008-09-29 19:45:12 +00:00
vm_pager.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_pager.h Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_param.h Fix CTL_VM_NAMES. 2007-10-16 11:32:57 +00:00
vm_phys.c Implement a mechanism within vm_phys_alloc_contig() to defer all necessary 2009-06-21 20:29:14 +00:00
vm_phys.h Modify vm_phys_unfree_page() so that it no longer requires the given 2007-12-20 22:45:54 +00:00
vm_reserv.c Previously, when vm_page_free_toq() was performed on a page belonging to 2009-04-11 09:09:00 +00:00
vm_reserv.h Introduce vm_reserv_reclaim_contig(). This function is used by 2008-04-06 18:09:28 +00:00
vm_unix.c Remove execute permission from the memory allocated by sbrk(). 2009-04-11 22:34:08 +00:00
vm_zeroidle.c Fill in a few sysctl descriptions. 2008-08-03 14:26:15 +00:00
vm.h Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vnode_pager.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vnode_pager.h Do not sleep for vnode lock while holding map lock in vm_fault. Try to 2009-02-08 20:23:46 +00:00