freebsd-nq/sys/vm
Don Lewis 47934cef8f Split the mlock() kernel code into two parts, mlock(), which unpacks
the syscall arguments and does the suser() permission check, and
kern_mlock(), which does the resource limit checking and calls
vm_map_wire().  Split munlock() in a similar way.

Enable the RLIMIT_MEMLOCK checking code in kern_mlock().

Replace calls to vslock() and vsunlock() in the sysctl code with
calls to kern_mlock() and kern_munlock() so that the sysctl code
will obey the wired memory limits.

Nuke the vslock() and vsunlock() implementations, which are no
longer used.

Add a member to struct sysctl_req to track the amount of memory
that is wired to handle the request.

Modify sysctl_wire_old_buffer() to return an error if its call to
kern_mlock() fails.  Only wire the minimum of the length specified
in the sysctl request and the length specified in its argument list.
It is recommended that sysctl handlers that use sysctl_wire_old_buffer()
should specify reasonable estimates for the amount of data they
want to return so that only the minimum amount of memory is wired
no matter what length has been specified by the request.

Modify the callers of sysctl_wire_old_buffer() to look for the
error return.

Modify sysctl_old_user to obey the wired buffer length and clean up
its implementation.

Reviewed by:	bms
2004-02-26 00:27:04 +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 - Substitute bdone() and bwait() from vfs_bio.c for 2004-02-23 03:15:13 +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 Correct a long-standing race condition in vm_contig_launder() that could 2004-02-16 03:43:57 +00:00
vm_extern.h Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +00:00
vm_fault.c Correct a long-standing race condition in vm_fault() that could result in a 2004-02-15 00:42:26 +00:00
vm_glue.c Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +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 Back out previous commit due to objections. 2004-02-16 21:36:59 +00:00
vm_kern.h More pipe changes: 2003-08-11 05:51:51 +00:00
vm_map.c Further reduce the use of Giant in vm_map_delete(): Perform pmap_remove() 2004-02-12 20:56:06 +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 Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +00:00
vm_object.c Correct a long-standing race condition in vm_object_page_remove() that 2004-02-22 03:36:51 +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 - Correct a long-standing race condition in vm_page_try_to_free() that 2004-02-19 07:43:55 +00:00
vm_page.h - Align a comment within struct vm_page. 2003-10-25 18:33:04 +00:00
vm_pageout.c Eliminate the second, unnecessary call to pmap_page_protect() near the end 2004-02-21 23:32:00 +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