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
This commit is contained in:
Konstantin Belousov 2013-03-27 10:52:18 +00:00
parent 378a72e36a
commit d4e9009cc8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=248789

View file

@ -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
/*