1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

Remove references to vm_zone.h and switch over to the new uma API.

This commit is contained in:
Jeff Roberson 2002-03-20 10:35:22 +00:00
parent ecca1f1c0a
commit 851031501a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92787
5 changed files with 8 additions and 20 deletions

View File

@ -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);
}
/*

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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 @@ svr4_sys_waitsys(td, uap)
#endif
#ifdef __FreeBSD__
mtx_destroy(&q->p_mtx);
zfree(proc_zone, q);
uma_zfree(proc_zone, q);
#endif
nprocs--;
return 0;