mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Remove references to vm_zone.h and switch over to the new uma API.
Reviewed by: jake
This commit is contained in:
parent
0a702a9b3a
commit
74cbb73ba8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92850
@ -40,8 +40,7 @@
|
||||
#ifndef _MACHINE_PV_H_
|
||||
#define _MACHINE_PV_H_
|
||||
|
||||
extern vm_zone_t pvzone;
|
||||
extern struct vm_zone pvzone_store;
|
||||
extern uma_zone_t pvzone;
|
||||
extern struct vm_object pvzone_obj;
|
||||
extern int pv_entry_count;
|
||||
extern int pv_entry_max;
|
||||
|
@ -46,7 +46,6 @@
|
||||
#include <vm/vm_kern.h>
|
||||
#include <vm/vm_page.h>
|
||||
#include <vm/vm_map.h>
|
||||
#include <vm/vm_zone.h>
|
||||
|
||||
#include <machine/asi.h>
|
||||
#include <machine/vmparam.h>
|
||||
|
@ -89,7 +89,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 <machine/cache.h>
|
||||
#include <machine/frame.h>
|
||||
@ -543,17 +543,10 @@ pmap_init(vm_offset_t phys_start, vm_offset_t phys_end)
|
||||
panic("pmap_init: vm_map_find");
|
||||
}
|
||||
|
||||
#if 0
|
||||
pvzone = &pvzone_store;
|
||||
pvinit = (struct pv_entry *)kmem_alloc(kernel_map,
|
||||
vm_page_array_size * sizeof (struct pv_entry));
|
||||
zbootinit(pvzone, "PV ENTRY", sizeof (struct pv_entry), pvinit,
|
||||
vm_page_array_size);
|
||||
#else
|
||||
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, pv_allocf);
|
||||
uma_prealloc(pvzone, vm_page_array_size);
|
||||
#endif
|
||||
pmap_initialized = TRUE;
|
||||
}
|
||||
|
||||
@ -571,11 +564,7 @@ pmap_init2(void)
|
||||
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);
|
||||
#else
|
||||
uma_zone_set_obj(pvzone, &pvzone_obj, pv_entry_max);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -49,7 +49,7 @@
|
||||
#include <vm/vm_object.h>
|
||||
#include <vm/vm_page.h>
|
||||
#include <vm/vm_pageout.h>
|
||||
#include <vm/vm_zone.h>
|
||||
#include <vm/uma.h>
|
||||
|
||||
#include <machine/asi.h>
|
||||
#include <machine/frame.h>
|
||||
@ -60,10 +60,7 @@
|
||||
#include <machine/tlb.h>
|
||||
#include <machine/tsb.h>
|
||||
|
||||
vm_zone_t pvzone;
|
||||
#if 0
|
||||
struct vm_zone pvzone_store;
|
||||
#endif
|
||||
uma_zone_t pvzone;
|
||||
struct vm_object pvzone_obj;
|
||||
int pv_entry_count;
|
||||
int pv_entry_max;
|
||||
@ -80,7 +77,7 @@ pv_alloc(void)
|
||||
pmap_pagedaemon_waken = 1;
|
||||
wakeup(&vm_pages_needed);
|
||||
}
|
||||
return (zalloc(pvzone));
|
||||
return (uma_zalloc(pvzone), M_WAITOK);
|
||||
}
|
||||
|
||||
void *
|
||||
@ -96,7 +93,7 @@ pv_free(pv_entry_t pv)
|
||||
{
|
||||
|
||||
pv_entry_count--;
|
||||
zfree(pvzone, pv);
|
||||
uma_zfree(pvzone, pv);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -65,7 +65,6 @@
|
||||
#include <vm/vm_kern.h>
|
||||
#include <vm/vm_map.h>
|
||||
#include <vm/vm_page.h>
|
||||
#include <vm/vm_zone.h>
|
||||
|
||||
#include <machine/clock.h>
|
||||
#include <machine/frame.h>
|
||||
|
@ -52,7 +52,6 @@
|
||||
#include <vm/vm_extern.h>
|
||||
#include <vm/vm_pageout.h>
|
||||
#include <vm/vm_pager.h>
|
||||
#include <vm/vm_zone.h>
|
||||
|
||||
#include <machine/cpufunc.h>
|
||||
#include <machine/frame.h>
|
||||
|
Loading…
Reference in New Issue
Block a user