Date: Thu, 2 Jul 2015 19:03:44 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285056 - head/sys/kern Message-ID: <201507021903.t62J3ilo031796@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Thu Jul 2 19:03:44 2015 New Revision: 285056 URL: https://svnweb.freebsd.org/changeset/base/285056 Log: sysvshm: don't lock proc when calculating attach_va vm_daddr is constant and RLIMIT_DATA can be obtained from thread's copy of rlimits. Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Thu Jul 2 19:00:22 2015 (r285055) +++ head/sys/kern/sysv_shm.c Thu Jul 2 19:03:44 2015 (r285056) @@ -380,10 +380,8 @@ kern_shmat_locked(struct thread *td, int * This is just a hint to vm_map_find() about where to * put it. */ - PROC_LOCK(p); attach_va = round_page((vm_offset_t)p->p_vmspace->vm_daddr + - lim_max_proc(p, RLIMIT_DATA)); - PROC_UNLOCK(p); + lim_max(td, RLIMIT_DATA)); } vm_object_reference(shmseg->object);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507021903.t62J3ilo031796>