diff options
author | ian <ian@FreeBSD.org> | 2014-05-16 01:30:30 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-05-16 01:30:30 +0000 |
commit | 8e2dd9b5e30117e2cab1d46c1cc0c2dfb4b7647e (patch) | |
tree | 35fa7519fc913330e83ec8d0a5549451f541f2e2 /sys/powerpc/include | |
parent | e58449eb7bc00b546bc709cb6348a17b98b8e5e6 (diff) | |
download | FreeBSD-src-8e2dd9b5e30117e2cab1d46c1cc0c2dfb4b7647e.zip FreeBSD-src-8e2dd9b5e30117e2cab1d46c1cc0c2dfb4b7647e.tar.gz |
MFC r257854 (discussed with alc@)
As of r257209, all architectures have defined
VM_KMEM_SIZE_SCALE. In other words, every architecture is now
auto-sizing the kmem arena. This revision changes kmeminit() so
that the definition of VM_KMEM_SIZE_SCALE becomes mandatory and
the definition of VM_KMEM_SIZE becomes optional.
Replace or eliminate all existing definitions of VM_KMEM_SIZE.
With auto-sizing enabled, VM_KMEM_SIZE effectively became an
alternate spelling for VM_KMEM_SIZE_MIN on most architectures.
Use VM_KMEM_SIZE_MIN for clarity.
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r-- | sys/powerpc/include/vmparam.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/powerpc/include/vmparam.h b/sys/powerpc/include/vmparam.h index e8e22cd..2d50f94 100644 --- a/sys/powerpc/include/vmparam.h +++ b/sys/powerpc/include/vmparam.h @@ -172,21 +172,23 @@ struct pmap_physseg { #define SGROWSIZ (128UL*1024) /* amount to grow stack */ #endif -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) +/* + * How many physical pages per kmem arena virtual page. + */ +#ifndef VM_KMEM_SIZE_SCALE +#define VM_KMEM_SIZE_SCALE (3) #endif /* - * 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. + * Optional floor (in bytes) on the size of the kmem arena. */ -#ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (3) +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (12 * 1024 * 1024) #endif /* - * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space. + * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the + * usable KVA space. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((VM_MAX_SAFE_KERNEL_ADDRESS - \ |