diff options
author | des <des@FreeBSD.org> | 2004-01-27 15:59:38 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-01-27 15:59:38 +0000 |
commit | 8b1373b33e38c4dc3c45820ed545b32ab925a42f (patch) | |
tree | 9e58d7f936db3e7c9b66ae5062591d65e619d74c /sys/kern/kern_malloc.c | |
parent | 58a1b901a48dccc815bfbd085b4cc8daa118b51a (diff) | |
download | FreeBSD-src-8b1373b33e38c4dc3c45820ed545b32ab925a42f.zip FreeBSD-src-8b1373b33e38c4dc3c45820ed545b32ab925a42f.tar.gz |
Rename the kern.vm.kmem.size tunable to the more logical vm.kmem_size. To
assure backward compatibility (conditional on !BURN_BRIDGES), look it up
by its old name first, and log a warning (but accept the setting) if it
was found. If both the old and new name are defined, the new name takes
precedence.
Also export vm.kmem_size as a read-only sysctl variable; I find it hard to
tune a parameter when I don't know its default value, especially when that
default value is computed at boot time.
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r-- | sys/kern/kern_malloc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 62fc909..cbcbe9e 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -133,6 +133,8 @@ struct { }; u_int vm_kmem_size; +SYSCTL_UINT(_vm, OID_AUTO, kmem_size, CTLFLAG_RD, &vm_kmem_size, 0, + "Size of kernel memory"); /* * The malloc_mtx protects the kmemstatistics linked list. @@ -444,7 +446,11 @@ kmeminit(dummy) #endif /* Allow final override from the kernel environment */ - TUNABLE_INT_FETCH("kern.vm.kmem.size", &vm_kmem_size); +#ifndef BURN_BRIDGES + if (TUNABLE_INT_FETCH("kern.vm.kmem.size", &vm_kmem_size) != 0) + printf("kern.vm.kmem.size is now called vm.kmem_size!\n"); +#endif + TUNABLE_INT_FETCH("vm.kmem_size", &vm_kmem_size); /* * Limit kmem virtual size to twice the physical memory. |