From d4e9009cc8b2d17d63b4a61eafc1cd3f3c1fa326 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 27 Mar 2013 10:52:18 +0000 Subject: [PATCH] Fix the VM_BCACHE_SIZE_MAX definition on i386 to match the maximal buffer map size, auto-tuned on the 4GB machine. Having the maxbcache bigger than the buffer map causes the transient bio map sizing logic to assume that there is enough KVA to use approximately 90MB (buffer map is sized to 110MB, and maxbcache is 200MB). The increase in the KVA usage caused other big KVA consumers, like nvidia.ko, to fail the initialization. Change the definition for both PAE and non-PAE cases, since PAE is even more KVA-starved. Reported and tested by: David Wolfskill Discussed with: alc Sponsored by: The FreeBSD Foundation --- sys/i386/include/param.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/i386/include/param.h b/sys/i386/include/param.h index b494f35095d..2d5f4a5d14b 100644 --- a/sys/i386/include/param.h +++ b/sys/i386/include/param.h @@ -140,9 +140,12 @@ * Ceiling on size of buffer cache (really only effects write queueing, * the VM page cache is not effected), can be changed via * the kern.maxbcache /boot/loader.conf variable. + * + * The value is equal to the size of the auto-tuned buffer map for + * the machine with 4GB of RAM, see vfs_bio.c:kern_vfs_bio_buffer_alloc(). */ #ifndef VM_BCACHE_SIZE_MAX -#define VM_BCACHE_SIZE_MAX (200 * 1024 * 1024) +#define VM_BCACHE_SIZE_MAX (7224 * 16 * 1024) #endif /*