kernel - Fix performance issue due to buffer fragmentation
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 22 Feb 2013 06:32:11 +0000 (22:32 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 22 Feb 2013 06:32:11 +0000 (22:32 -0800)
commit923b8527bc9e4b1e308949f0d95bc09a87798772
tree0b816eadaba024485ca7e646d22a55bb2a7fc39a
parent07baed26dd284572e0253aef3527c82a999438c3
kernel - Fix performance issue due to buffer fragmentation

* Systems with a lot of memory have very large buffer pools.  Defragmenting
  these pools can be expensive.  Often the buffer_map becomes full well
  before the bufspace actually hits its limits.  Filesystems such as HAMMER
  which use large buffer sizes (64K) are more likely to cause the problem.

  The result is extremely bad I/O performance for data not in the buffer
  cache which requires a new buffer to be instantiated.

* To solve this we double the size of the buffer_map's KVA area on
  64-bit systems while leaving the maximum buffer space allowed the
  same.  The larger virtual space greatly reduces KVA allocation
  failures due to fragmentation.

* This solves significant performance issues on monster with its 64G
  of ram, but should improve performance on any 64-bit system by
  reducing buffer cache defrag iterations.

* Also fix a possible intermediate value overflow in vlrureclaim().
sys/kern/vfs_mount.c
sys/platform/pc64/x86_64/machdep.c
sys/platform/vkernel64/x86_64/autoconf.c