kernel - Fix some clustering issues
commitcb1fa82f72b10f6f4cdab274c21edf668dd4d068
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 8 Jun 2016 22:53:31 +0000 (8 15:53 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 8 Jun 2016 22:53:31 +0000 (8 15:53 -0700)
tree3cf890c4c650dc0928b60672186db27462b5bb8b
parent05d3db1bc901548d6335d701c773c537d4ef42fd
kernel - Fix some clustering issues

* Change B_RAM functionality.  We were previously setting B_RAM
  on the last async buffer and doing some cruft to probe ahead.

  Instead, set B_RAM in the middle and use a simple heuristic to
  estimate where to pick-up the read-ahead again.

* Clean-up the read-ahead.  When the caller of cluster_read() asks for
  read-ahead, we do the read-ahead whether or not BMAP says it is
  contiguous.  All a failed BMAP does now is prevent cluster_rbuild()
  from getting called (that is, it doesn't try to gang multiple buffers
  together).

  When thinking about this, the logical buffer cache sequential heuristic
  is telling us that userland is going to read the data, so why stop and
  then have to stall on an I/O read later when userland actually reads
  the data?

* This will improve pipelining for both hammer1 and hammer2.
sys/kern/vfs_bio.c
sys/kern/vfs_cluster.c