diff options
author | alc <alc@FreeBSD.org> | 2003-12-22 01:01:32 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-12-22 01:01:32 +0000 |
commit | eae1da31eade2f857fee00c87d25f65464147206 (patch) | |
tree | 00ab7e424757b6c2744500cffe12cbbe1aba8f22 /sys/i386 | |
parent | 4982513fbdb0caefc7afd7fe4dcc81d4b4ae0fd7 (diff) | |
download | FreeBSD-src-eae1da31eade2f857fee00c87d25f65464147206.zip FreeBSD-src-eae1da31eade2f857fee00c87d25f65464147206.tar.gz |
- Significantly reduce the number of preallocated pv entries in
pmap_init(). Such a large preallocation is unnecessary and wastes
nearly eight megabytes of kernel virtual address space per gigabyte
of managed physical memory.
- Increase UMA_BOOT_PAGES by two. This enables the removal of
pmap_pv_allocf(). (Note: this function was only used during
initialization, specifically, after pmap_init() but before
pmap_init2(). During pmap_init2(), a new allocator is installed.)
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/pmap.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 823f6f4..dfaf699 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -245,7 +245,6 @@ static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex); static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va); static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t); static vm_offset_t pmap_kmem_choose(vm_offset_t addr); -static void *pmap_pv_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); #ifdef PAE static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); #endif @@ -418,13 +417,6 @@ pmap_set_pg(void) } } -static void * -pmap_pv_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) -{ - *flags = UMA_SLAB_PRIV; - return (void *)kmem_alloc(kernel_map, bytes); -} - #ifdef PAE static void * pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) @@ -446,7 +438,6 @@ pmap_init(phys_start, phys_end) vm_paddr_t phys_start, phys_end; { int i; - int initial_pvs; /* * Allocate memory for random pmap data structures. Includes the @@ -464,13 +455,9 @@ pmap_init(phys_start, phys_end) /* * init the pv free list */ - initial_pvs = vm_page_array_size; - if (initial_pvs < MINPV) - initial_pvs = MINPV; pvzone = uma_zcreate("PV ENTRY", sizeof (struct pv_entry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); - uma_zone_set_allocf(pvzone, pmap_pv_allocf); - uma_prealloc(pvzone, initial_pvs); + uma_prealloc(pvzone, MINPV); #ifdef PAE pdptzone = uma_zcreate("PDPT", NPGPTD * sizeof(pdpt_entry_t), NULL, |