Date: Wed, 5 Sep 2012 18:19:54 +0000 (UTC) From: Andrey Zonov <zont@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240145 - head/sys/vm Message-ID: <201209051819.q85IJsA6080768@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zont Date: Wed Sep 5 18:19:54 2012 New Revision: 240145 URL: http://svn.freebsd.org/changeset/base/240145 Log: - Simplify VM code by using vmspace_wired_count() for counting wired memory of a process. Reviewed by: avg Approved by: kib (mentor) MFC after: 2 weeks Modified: head/sys/vm/vm_mmap.c Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Wed Sep 5 17:13:08 2012 (r240144) +++ head/sys/vm/vm_mmap.c Wed Sep 5 18:19:54 2012 (r240145) @@ -1050,8 +1050,7 @@ sys_mlock(td, uap) return (ENOMEM); proc = td->td_proc; PROC_LOCK(proc); - nsize = ptoa(npages + - pmap_wired_count(vm_map_pmap(&proc->p_vmspace->vm_map))); + nsize = ptoa(npages + vmspace_wired_count(proc->p_vmspace)); if (nsize > lim_cur(proc, RLIMIT_MEMLOCK)) { PROC_UNLOCK(proc); return (ENOMEM); @@ -1072,7 +1071,7 @@ sys_mlock(td, uap) if (error != KERN_SUCCESS) { PROC_LOCK(proc); racct_set(proc, RACCT_MEMLOCK, - ptoa(pmap_wired_count(vm_map_pmap(&proc->p_vmspace->vm_map)))); + ptoa(vmspace_wired_count(proc->p_vmspace))); PROC_UNLOCK(proc); } #endif @@ -1148,7 +1147,7 @@ sys_mlockall(td, uap) if (error != KERN_SUCCESS) { PROC_LOCK(td->td_proc); racct_set(td->td_proc, RACCT_MEMLOCK, - ptoa(pmap_wired_count(vm_map_pmap(&td->td_proc->p_vmspace->vm_map)))); + ptoa(vmspace_wired_count(td->td_proc->p_vmspace))); PROC_UNLOCK(td->td_proc); } #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209051819.q85IJsA6080768>