kernel - Add vm.read_shortcut_enable
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 16 Sep 2012 03:52:45 +0000 (20:52 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 16 Sep 2012 05:08:40 +0000 (22:08 -0700)
commit68ad14555b583c75f3d3605fd3b5aee7328a8af0
tree0ad4cb7bed5972905666231051e8431b95f40f3f
parent69906b47fee5bb7cb43726f899fea0e6c0ea4a9e
kernel - Add vm.read_shortcut_enable

* Add vm.read_shortcut_enable (disabled by default for now).  Set to 1 to
  enable this feature.

  This enables a helper function which HAMMER1 now uses to short-cut read()
  operations on files.  This feature only works on x86-64.

* When enabled this feature allows file read() requests to be satisfied
  directly from the VM page cache using lwbuf's, completely bypassing the
  buffer cache and also bypassing most of the VFS's VOP_READ code.

  The result is an approximate doubling of read() performance in cases
  where the buffer cache is too small to fit the hot data set, but the VM
  page cache is not.

  This feature is able to avoid the buffer cache and thus prevent buffer
  cycling within it which, due to the constant installation and
  deinstallation of pages in KVM cause a great deal of SMP page table
  page invalidations.
sys/cpu/x86_64/include/lwbuf.h
sys/kern/vfs_helper.c
sys/kern/vfs_vnops.c
sys/sys/mount.h
sys/vfs/hammer/hammer_vnops.c