Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC.

Requested by:	alc
MFC after:	1 month
This commit is contained in:
Nathan Whitehorn 2013-10-27 14:03:51 +00:00
parent c9081a6c9c
commit a7bb5efa45

View file

@ -112,6 +112,7 @@
#define VM_MIN_KERNEL_ADDRESS KERNBASE
#define VM_MAX_KERNEL_ADDRESS 0xf8000000
#define VM_MAX_SAFE_KERNEL_ADDRESS VM_MAX_KERNEL_ADDRESS
#endif /* AIM/E500 */
@ -175,14 +176,21 @@ struct pmap_physseg {
#define VM_KMEM_SIZE (12 * 1024 * 1024)
#endif
#ifdef __powerpc64__
/*
* How many physical pages per KVA page allocated.
* min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX)
* is the total KVA space allocated for kmem_map.
*/
#ifndef VM_KMEM_SIZE_SCALE
#define VM_KMEM_SIZE_SCALE (3)
#define VM_KMEM_SIZE_SCALE (3)
#endif
/*
* Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space.
*/
#ifndef VM_KMEM_SIZE_MAX
#define VM_KMEM_SIZE_MAX 0x1c0000000 /* 7 GB */
#endif
#define VM_KMEM_SIZE_MAX ((VM_MAX_SAFE_KERNEL_ADDRESS - \
VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5)
#endif
#define ZERO_REGION_SIZE (64 * 1024) /* 64KB */