svn commit: r285054 - head/sys/vm
Mateusz Guzik
mjg at FreeBSD.org
Thu Jul 2 18:30:13 UTC 2015
Author: mjg
Date: Thu Jul 2 18:30:12 2015
New Revision: 285054
URL: https://svnweb.freebsd.org/changeset/base/285054
Log:
vm: don't lock proc around accesses to vm_{t,d}addr and RLIMIT_DATA in sys_mmap
vm_{t,d}addr are constant and we can use thread's copy of resource limits
Modified:
head/sys/vm/vm_mmap.c
Modified: head/sys/vm/vm_mmap.c
==============================================================================
--- head/sys/vm/vm_mmap.c Thu Jul 2 18:27:18 2015 (r285053)
+++ head/sys/vm/vm_mmap.c Thu Jul 2 18:30:12 2015 (r285054)
@@ -312,14 +312,12 @@ sys_mmap(td, uap)
* There should really be a pmap call to determine a reasonable
* location.
*/
- PROC_LOCK(td->td_proc);
if (addr == 0 ||
(addr >= round_page((vm_offset_t)vms->vm_taddr) &&
addr < round_page((vm_offset_t)vms->vm_daddr +
- lim_max_proc(td->td_proc, RLIMIT_DATA))))
+ lim_max(td, RLIMIT_DATA))))
addr = round_page((vm_offset_t)vms->vm_daddr +
- lim_max_proc(td->td_proc, RLIMIT_DATA));
- PROC_UNLOCK(td->td_proc);
+ lim_max(td, RLIMIT_DATA));
}
if (size == 0) {
/*
More information about the svn-src-head
mailing list