Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Replace uvm_aobj_cache with kmem(9).
details: https://anonhg.NetBSD.org/src/rev/b6ba901d9080
branches: trunk
changeset: 761928:b6ba901d9080
user: rmind <rmind%NetBSD.org@localhost>
date: Fri Feb 11 00:21:18 2011 +0000
description:
Replace uvm_aobj_cache with kmem(9).
diffstat:
sys/uvm/uvm_aobj.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diffs (69 lines):
diff -r 26e25293f296 -r b6ba901d9080 sys/uvm/uvm_aobj.c
--- a/sys/uvm/uvm_aobj.c Thu Feb 10 23:25:11 2011 +0000
+++ b/sys/uvm/uvm_aobj.c Fri Feb 11 00:21:18 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_aobj.c,v 1.112 2011/02/02 15:28:38 chuck Exp $ */
+/* $NetBSD: uvm_aobj.c,v 1.113 2011/02/11 00:21:18 rmind Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -27,6 +27,7 @@
*
* from: Id: uvm_aobj.c,v 1.1.2.5 1998/02/06 05:14:38 chs Exp
*/
+
/*
* uvm_aobj.c: anonymous memory uvm_object pager
*
@@ -37,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.112 2011/02/02 15:28:38 chuck Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.113 2011/02/11 00:21:18 rmind Exp $");
#include "opt_uvmhist.h"
@@ -131,13 +132,11 @@
LIST_HEAD(uao_swhash, uao_swhash_elt);
/*
- * uao_swhash_elt_pool: pool of uao_swhash_elt structures
- * NOTE: Pages for this pool must not come from a pageable kernel map!
+ * uao_swhash_elt_pool: pool of uao_swhash_elt structures.
+ * Note: pages for this pool must not come from a pageable kernel map.
*/
static struct pool uao_swhash_elt_pool;
-static struct pool_cache uvm_aobj_cache;
-
/*
* uvm_aobj: the actual anon-backed uvm_object
*
@@ -417,7 +416,7 @@
*/
UVM_OBJ_DESTROY(&aobj->u_obj);
- pool_cache_put(&uvm_aobj_cache, aobj);
+ kmem_free(aobj, sizeof(struct uvm_aobj));
}
/*
@@ -459,7 +458,7 @@
kobj_alloced = UAO_FLAG_KERNSWAP;
refs = 0xdeadbeaf; /* XXX: gcc */
} else {
- aobj = pool_cache_get(&uvm_aobj_cache, PR_WAITOK);
+ aobj = kmem_alloc(sizeof(struct uvm_aobj), KM_SLEEP);
aobj->u_pages = pages;
aobj->u_flags = 0;
refs = 1;
@@ -531,8 +530,6 @@
uao_initialized = true;
LIST_INIT(&uao_list);
mutex_init(&uao_list_lock, MUTEX_DEFAULT, IPL_NONE);
- pool_cache_bootstrap(&uvm_aobj_cache, sizeof(struct uvm_aobj), 0, 0,
- 0, "aobj", NULL, IPL_NONE, NULL, NULL, NULL);
pool_init(&uao_swhash_elt_pool, sizeof(struct uao_swhash_elt),
0, 0, 0, "uaoeltpl", NULL, IPL_VM);
}
Home |
Main Index |
Thread Index |
Old Index