diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2015-03-24 20:09:55 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2015-03-24 20:09:55 +0000 |
commit | 2ef1cdce8ec56c3e9a3a5c90dcdef66388734ad8 (patch) | |
tree | 69a55bfaea8b9184b4e6fea0c6df1d96ff7df211 /sys/vm | |
parent | 5ab5a7c167b93709c6c89464ee805633444f11db (diff) | |
download | FreeBSD-src-2ef1cdce8ec56c3e9a3a5c90dcdef66388734ad8.zip FreeBSD-src-2ef1cdce8ec56c3e9a3a5c90dcdef66388734ad8.tar.gz |
Use TUNABLE_INT_FETCH for boot_pages.
vm.boot_pages is marked as a CTLFLAG_RDTUN, but it's used by the VM
before the sysctl subsystem is initialsed. We manually fetch the
variable from the environment to work around this problem.
Tested by: Keith White kwhite at uottawa.ca
MFC after: 1 week
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_page.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 428a60d..a764788 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -134,8 +134,9 @@ long first_page; int vm_page_zero_count; static int boot_pages = UMA_BOOT_PAGES; -SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RDTUN, &boot_pages, 0, - "number of pages allocated for bootstrapping the VM system"); +SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &boot_pages, 0, + "number of pages allocated for bootstrapping the VM system"); static int pa_tryrelock_restart; SYSCTL_INT(_vm, OID_AUTO, tryrelock_restart, CTLFLAG_RD, @@ -349,6 +350,7 @@ vm_page_startup(vm_offset_t vaddr) * Allocate memory for use when boot strapping the kernel memory * allocator. */ + TUNABLE_INT_FETCH("vm.boot_pages", &boot_pages); new_end = end - (boot_pages * UMA_SLAB_SIZE); new_end = trunc_page(new_end); mapped = pmap_map(&vaddr, new_end, end, |