summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2011-03-23 16:38:29 +0000
committeralc <alc@FreeBSD.org>2011-03-23 16:38:29 +0000
commitc84b8f6e0c78ee33159cffed66726666e210f53a (patch)
treebf468389fa1d0f26006a2291890ed795a1f778b4 /sys/kern/kern_malloc.c
parent817bc23655881aacdc412c27eb48ce561b35ee46 (diff)
downloadFreeBSD-src-c84b8f6e0c78ee33159cffed66726666e210f53a.zip
FreeBSD-src-c84b8f6e0c78ee33159cffed66726666e210f53a.tar.gz
Modestly increase the maximum allowed size of the kmem map on i386.
Also, express this new maximum as a fraction of the kernel's address space size rather than a constant so that increasing KVA_PAGES will automatically increase this maximum. As a side-effect of this change, kern.maxvnodes will automatically increase by a proportional amount. While I'm here ensure that this change doesn't result in an unintended increase in maxpipekva on i386. Calculate maxpipekva based upon the size of the kernel address space and the amount of physical memory instead of the size of the kmem map. The memory backing pipes is not allocated from the kmem map. It is allocated from its own submap of the kernel map. In short, it has no real connection to the kmem map. (In fact, the commit messages for the maxpipekva auto-sizing talk about using the kernel map size, cf. r117325 and r117391, even though the implementation actually used the kmem map size.) Although the calculation is now done differently, the resulting value for maxpipekva should remain almost the same on i386. However, on amd64, the value will be reduced by 2/3. This is intentional. The recent change to VM_KMEM_SIZE_SCALE on amd64 for the benefit of ZFS also had the unnecessary side-effect of increasing maxpipekva. This change is effectively restoring maxpipekva on amd64 to its prior value. Eliminate init_param3() since it is no longer used.
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index a3a9795..7843cae 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -709,11 +709,6 @@ kmeminit(void *dummy)
if (((vm_kmem_size / 2) / PAGE_SIZE) > cnt.v_page_count)
vm_kmem_size = 2 * cnt.v_page_count * PAGE_SIZE;
- /*
- * Tune settings based on the kmem map's size at this time.
- */
- init_param3(vm_kmem_size / PAGE_SIZE);
-
#ifdef DEBUG_MEMGUARD
tmp = memguard_fudge(vm_kmem_size, vm_kmem_size_max);
#else
OpenPOWER on IntegriCloud