Module Name:    src
Committed By:   bouyer
Date:           Mon Mar 12 21:37:13 UTC 2012

Modified Files:
        src/sys/uvm: uvm_km.c

Log Message:
uvm_km_pgremove_intrsafe(): properly compute the size to pmap_kremove()
(do not trucate it to the first __PGRM_BATCH pages per batch): if we were
given a sparse mapping, we could leave mappings in place.
Note that this doesn't seem to be a problem right now: I added a KASSERT
in my private tree to see if uvm_km_pgremove_intrsafe() would use a
too short size, and it didn't fire.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/uvm/uvm_km.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_km.c
diff -u src/sys/uvm/uvm_km.c:1.123 src/sys/uvm/uvm_km.c:1.124
--- src/sys/uvm/uvm_km.c:1.123	Sat Feb 25 22:28:06 2012
+++ src/sys/uvm/uvm_km.c	Mon Mar 12 21:37:12 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_km.c,v 1.123 2012/02/25 22:28:06 rmind Exp $	*/
+/*	$NetBSD: uvm_km.c,v 1.124 2012/03/12 21:37:12 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -120,7 +120,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.123 2012/02/25 22:28:06 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.124 2012/03/12 21:37:12 bouyer Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -485,7 +485,7 @@ uvm_km_pgremove_intrsafe(struct vm_map *
 		}
 		npgrm = i;
 		/* now remove the mappings */
-		pmap_kremove(batch_vastart, PAGE_SIZE * npgrm);
+		pmap_kremove(batch_vastart, va - batch_vastart);
 		/* and free the pages */
 		for (i = 0; i < npgrm; i++) {
 			pg = PHYS_TO_VM_PAGE(pa[i]);

Reply via email to