Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern Always use rumpuser_malloc() for a...



details:   https://anonhg.NetBSD.org/src/rev/d9e95588cc9b
branches:  trunk
changeset: 755326:d9e95588cc9b
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Jun 01 19:18:20 2010 +0000

description:
Always use rumpuser_malloc() for allocating both poolpage and
poolpage_cache -- its bootstrap cost is slightly higher than
anonmmap, but it's faster in the long run.

diffstat:

 sys/rump/librump/rumpkern/vm.c |  14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diffs (42 lines):

diff -r 53cd3a1429b1 -r d9e95588cc9b sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c    Tue Jun 01 18:20:26 2010 +0000
+++ b/sys/rump/librump/rumpkern/vm.c    Tue Jun 01 19:18:20 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.c,v 1.76 2010/06/01 10:29:21 pooka Exp $    */
+/*     $NetBSD: vm.c,v 1.77 2010/06/01 19:18:20 pooka Exp $    */
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.76 2010/06/01 10:29:21 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.77 2010/06/01 19:18:20 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -595,21 +595,15 @@
 vaddr_t
 uvm_km_alloc_poolpage_cache(struct vm_map *map, bool waitok)
 {
-       void *rv;
-       int error;
 
-       rv = rumpuser_anonmmap(PAGE_SIZE, PAGE_SHIFT, 0, &error);
-       if (rv == NULL && waitok)
-               panic("fixme: poolpage alloc failed");
-
-       return (vaddr_t)rv;
+       return uvm_km_alloc_poolpage(map, waitok);
 }
 
 void
 uvm_km_free_poolpage_cache(struct vm_map *map, vaddr_t vaddr)
 {
 
-       rumpuser_unmap((void *)vaddr, PAGE_SIZE);
+       uvm_km_free_poolpage(map, vaddr);
 }
 
 void



Home | Main Index | Thread Index | Old Index