Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2014 16:22:37 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r266588 - head/sys/vm
Message-ID:  <201405231622.s4NGMbNg024234@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405231622.s4NGMbNg024234>