1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/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
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
redzone.c
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
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
uma_dbg.h
uma_int.h
uma.h
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
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
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
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
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
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
vm_reserv.c
vm_reserv.h
vm_unix.c
vm_zeroidle.c
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