From owner-svn-src-head@FreeBSD.ORG Fri May 23 16:22:37 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59115844; Fri, 23 May 2014 16:22:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46A082DE2; Fri, 23 May 2014 16:22:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4NGMbH0024235; Fri, 23 May 2014 16:22:37 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4NGMbNg024234; Fri, 23 May 2014 16:22:37 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201405231622.s4NGMbNg024234@svn.freebsd.org> From: Alan Cox Date: Fri, 23 May 2014 16:22:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266588 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 16:22:37 -0000 Author: alc Date: Fri May 23 16:22:36 2014 New Revision: 266588 URL: http://svnweb.freebsd.org/changeset/base/266588 Log: There is no reason to perform the pmap_remove() on the kernel pmap while the kmem object lock is held. Do the pmap_remove() before acquiring the kmem object lock. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Fri May 23 14:34:22 2014 (r266587) +++ head/sys/vm/vm_kern.c Fri May 23 16:22:36 2014 (r266588) @@ -396,9 +396,9 @@ kmem_unback(vm_object_t object, vm_offse KASSERT(object == kmem_object || object == kernel_object, ("kmem_unback: only supports kernel objects.")); + pmap_remove(kernel_pmap, addr, addr + size); offset = addr - VM_MIN_KERNEL_ADDRESS; VM_OBJECT_WLOCK(object); - pmap_remove(kernel_pmap, addr, addr + size); for (i = 0; i < size; i += PAGE_SIZE) { m = vm_page_lookup(object, OFF_TO_IDX(offset + i)); vm_page_unwire(m, 0);