summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-07-03 19:16:37 +0000
committeralc <alc@FreeBSD.org>2002-07-03 19:16:37 +0000
commit71b0d8951833492a73a3ef9c2d13d4995474f8b3 (patch)
treeba44ad9430491c8d35901ce92ed68241c9612b23 /sys
parent2e9ef09d73b03466f0aa2490ffbdf554d934fea2 (diff)
downloadFreeBSD-src-71b0d8951833492a73a3ef9c2d13d4995474f8b3.zip
FreeBSD-src-71b0d8951833492a73a3ef9c2d13d4995474f8b3.tar.gz
o Make the reservation of KVA space for kernel map entries a function
of the KVA space's size in addition to the amount of physical memory and reduce it by a factor of two. Under the old formula, our reservation amounted to one kernel map entry per virtual page in the KVA space on a 4GB i386.
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 437a0ce..6ba4233 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -263,7 +263,8 @@ vmspace_alloc(min, max)
void
vm_init2(void)
{
- uma_zone_set_obj(kmapentzone, &kmapentobj, cnt.v_page_count / 4);
+ uma_zone_set_obj(kmapentzone, &kmapentobj, min(cnt.v_page_count,
+ (VM_MAX_KERNEL_ADDRESS - KERNBASE) / PAGE_SIZE) / 8);
vmspace_zone = uma_zcreate("VMSPACE", sizeof(struct vmspace), NULL,
#ifdef INVARIANTS
vmspace_zdtor,
OpenPOWER on IntegriCloud