diff options
author | Don Lewis <truckman@FreeBSD.org> | 2004-03-05 22:03:11 +0000 |
---|---|---|
committer | Don Lewis <truckman@FreeBSD.org> | 2004-03-05 22:03:11 +0000 |
commit | 169299398a2a9e940511bfe7790697236a4a40f3 (patch) | |
tree | 8946cd82a88106cba27e5808596af0a80a82338b /sys/vm/vm_extern.h | |
parent | 6a3d33ac5ea7bffa71dbdac29e114db27bd8660b (diff) | |
download | src-169299398a2a9e940511bfe7790697236a4a40f3.tar.gz src-169299398a2a9e940511bfe7790697236a4a40f3.zip |
Undo the merger of mlock()/vslock and munlock()/vsunlock() and the
introduction of kern_mlock() and kern_munlock() in
src/sys/kern/kern_sysctl.c 1.150
src/sys/vm/vm_extern.h 1.69
src/sys/vm/vm_glue.c 1.190
src/sys/vm/vm_mmap.c 1.179
because different resource limits are appropriate for transient and
"permanent" page wiring requests.
Retain the kern_mlock() and kern_munlock() API in the revived
vslock() and vsunlock() functions.
Combine the best parts of each of the original sets of implementations
with further code cleanup. Make the mclock() and vslock()
implementations as similar as possible.
Retain the RLIMIT_MEMLOCK check in mlock(). Move the most strigent
test, which can return EAGAIN, last so that requests that have no
hope of ever being satisfied will not be retried unnecessarily.
Disable the test that can return EAGAIN in the vslock() implementation
because it will cause the sysctl code to wedge.
Tested by: Cy Schubert <Cy.Schubert AT komquats.com>
Notes
Notes:
svn path=/head/; revision=126668
Diffstat (limited to 'sys/vm/vm_extern.h')
-rw-r--r-- | sys/vm/vm_extern.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h index d8581e6f5857..9795cc18376a 100644 --- a/sys/vm/vm_extern.h +++ b/sys/vm/vm_extern.h @@ -59,8 +59,6 @@ int sstk(struct thread *, void *, int *); int swapon(struct thread *, void *, int *); #endif /* TYPEDEF_FOR_UAP */ -int kern_mlock(struct thread *, vm_offset_t, vm_size_t); -int kern_munlock(struct thread *, vm_offset_t, vm_size_t); int kernacc(void *, int, int); vm_offset_t kmem_alloc(vm_map_t, vm_size_t); vm_offset_t kmem_alloc_nofault(vm_map_t, vm_size_t); @@ -88,6 +86,8 @@ void vmspace_unshare(struct proc *); void vmspace_free(struct vmspace *); void vmspace_exitfree(struct proc *); void vnode_pager_setsize(struct vnode *, vm_ooffset_t); +int vslock(struct thread *, vm_offset_t, vm_size_t); +int vsunlock(struct thread *, vm_offset_t, vm_size_t); void vm_object_print(/* db_expr_t */ long, boolean_t, /* db_expr_t */ long, char *); int vm_fault_quick(caddr_t v, int prot); |