Module Name: src Committed By: matt Date: Mon Sep 3 19:53:43 UTC 2012
Modified Files: src/sys/uvm: uvm_km.c uvm_map.c Log Message: Switch to a spin lock (uvm_kentry_lock) which, fortunately, was sitting there unused. To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133 src/sys/uvm/uvm_km.c cvs rdiff -u -r1.320 -r1.321 src/sys/uvm/uvm_map.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.132 src/sys/uvm/uvm_km.c:1.133 --- src/sys/uvm/uvm_km.c:1.132 Mon Sep 3 17:30:04 2012 +++ src/sys/uvm/uvm_km.c Mon Sep 3 19:53:42 2012 @@ -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 @@ again: * 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; Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.320 src/sys/uvm/uvm_map.c:1.321 --- src/sys/uvm/uvm_map.c:1.320 Mon Sep 3 17:30:04 2012 +++ src/sys/uvm/uvm_map.c Mon Sep 3 19:53:42 2012 @@ -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 @@ retry: * 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);