diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2005-10-08 21:03:54 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2005-10-08 21:03:54 +0000 |
| commit | 3803b26bae126d6ada2713be859da03c75576477 (patch) | |
| tree | d2daa61bd2acc81c850762097940323e59624571 /sys/vm | |
| parent | 7cb209f5d08322ca30faf6aaec2c3bb27c0ea40f (diff) | |
Notes
Diffstat (limited to 'sys/vm')
| -rw-r--r-- | sys/vm/uma.h | 4 | ||||
| -rw-r--r-- | sys/vm/uma_core.c | 8 | ||||
| -rw-r--r-- | sys/vm/vm_page.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/vm/uma.h b/sys/vm/uma.h index 52bbe2c3b40e9..2181ec72dfec0 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -350,11 +350,11 @@ typedef void (*uma_free)(void *item, int size, u_int8_t pflag); * Discussion: * This memory is used for zones which allocate things before the * backend page supplier can give us pages. It should be - * UMA_SLAB_SIZE * UMA_BOOT_PAGES bytes. (see uma_int.h) + * UMA_SLAB_SIZE * boot_pages bytes. (see uma_int.h) * */ -void uma_startup(void *bootmem); +void uma_startup(void *bootmem, int boot_pages); /* * Finishes starting up the allocator. This should diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 49d1e3cd35741..a15c453476b0a 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -324,7 +324,7 @@ bucket_alloc(int entries, int bflags) /* * This is to stop us from allocating per cpu buckets while we're - * running out of UMA_BOOT_PAGES. Otherwise, we would exhaust the + * running out of vm.boot_pages. Otherwise, we would exhaust the * boot pages. This also prevents us from allocating buckets in * low memory situations. */ @@ -921,7 +921,7 @@ startup_alloc(uma_zone_t zone, int bytes, u_int8_t *pflag, int wait) } mtx_unlock(&uma_boot_pages_mtx); if (booted == 0) - panic("UMA: Increase UMA_BOOT_PAGES"); + panic("UMA: Increase vm.boot_pages"); /* * Now that we've booted reset these users to their real allocator. */ @@ -1499,7 +1499,7 @@ zone_foreach(void (*zfunc)(uma_zone_t)) /* Public functions */ /* See uma.h */ void -uma_startup(void *bootmem) +uma_startup(void *bootmem, int boot_pages) { struct uma_zctor_args args; uma_slab_t slab; @@ -1599,7 +1599,7 @@ uma_startup(void *bootmem) #ifdef UMA_DEBUG printf("Filling boot free list.\n"); #endif - for (i = 0; i < UMA_BOOT_PAGES; i++) { + for (i = 0; i < boot_pages; i++) { slab = (uma_slab_t)((u_int8_t *)bootmem + (i * UMA_SLAB_SIZE)); slab->us_data = (u_int8_t *)slab; slab->us_flags = UMA_SLAB_BOOT; diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 6dd51b5329865..98ec1ef4712ea 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -229,8 +229,8 @@ vm_page_startup(vm_offset_t vaddr) new_end = trunc_page(new_end); mapped = pmap_map(&vaddr, new_end, end, VM_PROT_READ | VM_PROT_WRITE); - bzero((caddr_t) mapped, end - new_end); - uma_startup((caddr_t)mapped); + bzero((void *)mapped, end - new_end); + uma_startup((void *)mapped, boot_pages); /* * Compute the number of pages of memory that will be available for |
