Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Switch to a spin lock (uvm_kentry_lock) which, fortu...



details:   https://anonhg.NetBSD.org/src/rev/cdfdde1b362e
branches:  trunk
changeset: 781397:cdfdde1b362e
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Sep 03 19:53:42 2012 +0000

description:
Switch to a spin lock (uvm_kentry_lock) which, fortunately, was sitting there
unused.

diffstat:

 sys/uvm/uvm_km.c  |  8 ++++----
 sys/uvm/uvm_map.c |  8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (66 lines):

diff -r 5784bd8d8876 -r cdfdde1b362e sys/uvm/uvm_km.c
--- a/sys/uvm/uvm_km.c  Mon Sep 03 17:46:08 2012 +0000
+++ b/sys/uvm/uvm_km.c  Mon Sep 03 19:53:42 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_km.c,v 1.132 2012/09/03 17:30:04 matt Exp $        */
+/*     $NetBSD: uvm_km.c,v 1.133 2012/09/03 19:53: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.132 2012/09/03 17:30:04 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.133 2012/09/03 19:53:42 matt Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -785,14 +785,14 @@
         * These VA allocations happen independently of uvm_map so if this allocation
         * extends beyond the current limit, then allocate more resources for it.
         */
-       mutex_enter(&kernel_map->misc_lock);
+       mutex_enter(&uvm_kentry_lock);
        if (uvm_maxkaddr < va + size) {
                uvm_maxkaddr = pmap_growkernel(va + size);
                KASSERTMSG(uvm_maxkaddr >= va + size,
                    "%#"PRIxVADDR" %#"PRIxPTR" %#zx",
                    uvm_maxkaddr, va, size);
        }
-       mutex_exit(&kernel_map->misc_lock);
+       mutex_exit(&uvm_kentry_lock);
 #endif
 
        loopva = va;
diff -r 5784bd8d8876 -r cdfdde1b362e sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Mon Sep 03 17:46:08 2012 +0000
+++ b/sys/uvm/uvm_map.c Mon Sep 03 19:53:42 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.320 2012/09/03 17:30:04 matt Exp $       */
+/*     $NetBSD: uvm_map.c,v 1.321 2012/09/03 19:53:42 matt Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.320 2012/09/03 17:30:04 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.321 2012/09/03 19:53:42 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -1182,10 +1182,10 @@
         * If the kernel pmap can't map the requested space,
         * then allocate more resources for it.
         */
-       mutex_enter(&map->misc_lock);
+       mutex_enter(&uvm_kentry_lock);
        if (map == kernel_map && uvm_maxkaddr < (start + size))
                uvm_maxkaddr = pmap_growkernel(start + size);
-       mutex_exit(&map->misc_lock);
+       mutex_exit(&uvm_kentry_lock);
 #endif
 
        UVMMAP_EVCNT_INCR(map_call);



Home | Main Index | Thread Index | Old Index