summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-03-20 10:35:22 +0000
committerjeff <jeff@FreeBSD.org>2002-03-20 10:35:22 +0000
commit453d388794d43ea15c2744894c8bcdc0b8c301eb (patch)
treeace7dbc0b6f1c811a17fd03e386b3baea612da92 /sys
parentd7ea51307ac2d71ca660e3543a6d89543e2aee1b (diff)
downloadFreeBSD-src-453d388794d43ea15c2744894c8bcdc0b8c301eb.zip
FreeBSD-src-453d388794d43ea15c2744894c8bcdc0b8c301eb.tar.gz
Remove references to vm_zone.h and switch over to the new uma API.
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/pmap.c21
-rw-r--r--sys/compat/linprocfs/linprocfs.c1
-rw-r--r--sys/compat/linux/linux_misc.c1
-rw-r--r--sys/compat/pecoff/imgact_pecoff.c1
-rw-r--r--sys/compat/svr4/svr4_misc.c4
5 files changed, 8 insertions, 20 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c
index 1575a81..12d151b 100644
--- a/sys/alpha/alpha/pmap.c
+++ b/sys/alpha/alpha/pmap.c
@@ -169,7 +169,7 @@
#include <vm/vm_extern.h>
#include <vm/vm_pageout.h>
#include <vm/vm_pager.h>
-#include <vm/vm_zone.h>
+#include <vm/uma.h>
#include <sys/user.h>
@@ -321,7 +321,7 @@ static struct mtx allpmaps_lock;
/*
* Data for the pv entry allocation mechanism
*/
-static vm_zone_t pvzone;
+static uma_zone_t pvzone;
static struct vm_object pvzone_obj;
static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0;
static int pmap_pagedaemon_waken = 0;
@@ -615,14 +615,8 @@ pmap_init(phys_start, phys_end)
initial_pvs = vm_page_array_size;
if (initial_pvs < MINPV)
initial_pvs = MINPV;
-#if 0
- pvzone = &pvzone_store;
- pvinit = (struct pv_entry *) kmem_alloc(kernel_map,
- initial_pvs * sizeof (struct pv_entry));
- zbootinit(pvzone, "PV ENTRY", sizeof (struct pv_entry), pvinit,
- vm_page_array_size);
-#endif
- pvzone = zinit("PV ENTRY", sizeof (struct pv_entry), 0, 0, 0);
+ pvzone = uma_zcreate("PV ENTRY", sizeof (struct pv_entry), NULL, NULL,
+ NULL, NULL, UMA_ALIGN_PTR, 0);
uma_zone_set_allocf(pvzone, pmap_allocf);
uma_prealloc(pvzone, initial_pvs);
/*
@@ -649,9 +643,6 @@ pmap_init2()
TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc);
pv_entry_max = shpgperproc * maxproc + vm_page_array_size;
pv_entry_high_water = 9 * (pv_entry_max / 10);
-#if 0
- zinitna(pvzone, &pvzone_obj, NULL, 0, pv_entry_max, ZONE_INTERRUPT, 1);
-#endif
uma_zone_set_obj(pvzone, &pvzone_obj, pv_entry_max);
}
@@ -1827,7 +1818,7 @@ static PMAP_INLINE void
free_pv_entry(pv_entry_t pv)
{
pv_entry_count--;
- zfree(pvzone, pv);
+ uma_zfree(pvzone, pv);
}
/*
@@ -1846,7 +1837,7 @@ get_pv_entry(void)
pmap_pagedaemon_waken = 1;
wakeup (&vm_pages_needed);
}
- return zalloc(pvzone);
+ return uma_zalloc(pvzone, M_NOWAIT);
}
/*
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index ee14f2b..01b4c7c 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -73,7 +73,6 @@
#include <vm/vm_map.h>
#include <vm/vm_param.h>
#include <vm/vm_object.h>
-#include <vm/vm_zone.h>
#include <vm/swap_pager.h>
#include <machine/clock.h>
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 68f99fb..b43c1d5 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -62,7 +62,6 @@
#include <vm/vm_map.h>
#include <vm/vm_extern.h>
#include <vm/vm_object.h>
-#include <vm/vm_zone.h>
#include <vm/swap_pager.h>
#include <machine/frame.h>
diff --git a/sys/compat/pecoff/imgact_pecoff.c b/sys/compat/pecoff/imgact_pecoff.c
index f3acb99..4656899 100644
--- a/sys/compat/pecoff/imgact_pecoff.c
+++ b/sys/compat/pecoff/imgact_pecoff.c
@@ -66,7 +66,6 @@
#include <vm/vm_map.h>
#include <vm/vm_object.h>
#include <vm/vm_extern.h>
-#include <vm/vm_zone.h>
#include <sys/user.h>
#include <sys/exec.h>
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 14c7cba..33c679a 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -84,7 +84,7 @@
#include <vm/vm_param.h>
#include <vm/vm_map.h>
#if defined(__FreeBSD__)
-#include <vm/vm_zone.h>
+#include <vm/uma.h>
#endif
#if defined(NetBSD)
@@ -1368,7 +1368,7 @@ loop:
#endif
#ifdef __FreeBSD__
mtx_destroy(&q->p_mtx);
- zfree(proc_zone, q);
+ uma_zfree(proc_zone, q);
#endif
nprocs--;
return 0;
OpenPOWER on IntegriCloud