diff options
author | Alan Cox <alc@FreeBSD.org> | 2013-11-08 16:25:00 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2013-11-08 16:25:00 +0000 |
commit | c70af4875e5b239a302f2d34d73d6acac2ddd5a9 (patch) | |
tree | 10be1b225c61aa3fef5a16664784e1bc60913d34 /sys/mips | |
parent | fba3cde907930eed2adb8a320524bc250338c729 (diff) | |
download | src-c70af4875e5b239a302f2d34d73d6acac2ddd5a9.tar.gz src-c70af4875e5b239a302f2d34d73d6acac2ddd5a9.zip |
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.
Change kmeminit() so that the effect of defining VM_KMEM_SIZE is similar to
that of setting the tunable vm.kmem_size. Whereas the macros
VM_KMEM_SIZE_{MAX,MIN,SCALE} have had the same effect as the tunables
vm.kmem_size_{max,min,scale}, the effects of VM_KMEM_SIZE and vm.kmem_size
have been distinct. In particular, whereas VM_KMEM_SIZE was overridden by
VM_KMEM_SIZE_{MAX,MIN,SCALE} and vm.kmem_size_{max,min,scale}, vm.kmem_size
was not. Remedy this inconsistency. Now, VM_KMEM_SIZE can be used to set
the size of the kmem arena at compile-time without that value being
overridden by auto-sizing.
Update the nearby comments to reflect the kmem submap being replaced by the
kmem arena. Stop duplicating the auto-sizing formula in every machine-
dependent vmparam.h and place it in kmeminit() where auto-sizing takes
place.
Reviewed by: kib (an earlier version)
Sponsored by: EMC / Isilon Storage Division
Notes
Notes:
svn path=/head/; revision=257854
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/include/vmparam.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/mips/include/vmparam.h b/sys/mips/include/vmparam.h index 4e1f03c55185..8922924faa76 100644 --- a/sys/mips/include/vmparam.h +++ b/sys/mips/include/vmparam.h @@ -108,22 +108,23 @@ #define VM_NRESERVLEVEL 0 #endif -/* virtual sizes (bytes) for various kernel submaps */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) -#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. + * How many physical pages per kmem arena virtual page. */ #ifndef VM_KMEM_SIZE_SCALE #define VM_KMEM_SIZE_SCALE (3) #endif /* - * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space. + * Optional floor (in bytes) on the size of the kmem arena. + */ +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (12 * 1024 * 1024) +#endif + +/* + * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the + * kernel map. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \ |