Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Don't try grow the entire kmem space but just do as ...
details: https://anonhg.NetBSD.org/src/rev/be6cdcd0bc0c
branches: trunk
changeset: 781391:be6cdcd0bc0c
user: matt <matt%NetBSD.org@localhost>
date: Mon Sep 03 15:55:42 2012 +0000
description:
Don't try grow the entire kmem space but just do as needed in uvm_km_kmem_alloc
diffstat:
sys/uvm/uvm_km.c | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diffs (60 lines):
diff -r 214494808497 -r be6cdcd0bc0c sys/uvm/uvm_km.c
--- a/sys/uvm/uvm_km.c Mon Sep 03 15:38:17 2012 +0000
+++ b/sys/uvm/uvm_km.c Mon Sep 03 15:55:42 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_km.c,v 1.129 2012/09/03 14:21:24 matt Exp $ */
+/* $NetBSD: uvm_km.c,v 1.130 2012/09/03 15:55:42 matt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -152,7 +152,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.129 2012/09/03 14:21:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.130 2012/09/03 15:55:42 matt Exp $");
#include "opt_uvmhist.h"
@@ -323,20 +323,6 @@
kernel_map = &kernel_map_store;
-#ifdef PMAP_GROWKERNEL
- /*
- * Since we just set kernel_map, the check in uvm_map_prepare to grow the
- * kernel's VA space never happened so we must do it here. If the kernel
- * pmap can't map the requested space, then allocate more resources for it.
- */
- if (uvm_maxkaddr < kmembase + kmemsize) {
- uvm_maxkaddr = pmap_growkernel(kmembase + kmemsize);
- if (uvm_maxkaddr < kmembase + kmemsize)
- panic("%s: pmap_growkernel(%#"PRIxVADDR") failed",
- __func__, kmembase + kmemsize);
- }
-#endif
-
pool_subsystem_init();
vmem_bootstrap();
@@ -794,6 +780,20 @@
if (rc != 0)
return rc;
+#ifdef PMAP_GROWKERNEL
+ /*
+ * Since we just set kernel_map, the check in uvm_map_prepare to grow the
+ * kernel's VA space never happened so we must do it here. If the kernel
+ * pmap can't map the requested space, then allocate more resources for it.
+ */
+ if (uvm_maxkaddr < va + size) {
+ uvm_maxkaddr = pmap_growkernel(va + size);
+ if (uvm_maxkaddr < va + size)
+ panic("%s: pmap_growkernel(%#"PRIxVADDR") failed",
+ __func__, va + size);
+ }
+#endif
+
loopva = va;
loopsize = size;
Home |
Main Index |
Thread Index |
Old Index