path: root/sbin/mdmfs
diff options
authorDon Lewis <truckman@FreeBSD.org>2004-02-26 00:27:04 +0000
committerDon Lewis <truckman@FreeBSD.org>2004-02-26 00:27:04 +0000
commit47934cef8f8eae0614799485658acebe190602f7 (patch)
treed1174aae4c9e291961c623eba11458d6d2058f11 /sbin/mdmfs
parent049ffe98a8458044c1c409b9c0e4ac9fccd15f33 (diff)
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
Notes: svn path=/head/; revision=126253
Diffstat (limited to 'sbin/mdmfs')
0 files changed, 0 insertions, 0 deletions