kernel - Fix cluster_read random I/O heuristic
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 28 Mar 2010 18:23:04 +0000 (11:23 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 28 Mar 2010 18:23:04 +0000 (11:23 -0700)
commit69adbed48cd5565446e8013fcc5131405a9e7c05
tree5f3273bd0614738955eeb9d413fea6eceec2985a
parentf80ef8b61e6ce3ddfe564a57e6c8b825156d299c
kernel - Fix cluster_read random I/O heuristic

* cluster_read was improperly accounting for the seqcount in the random
  I/O heuristic, failing to reduce the count in the loop which led to
  fairly maximal sequential read-ahead even for random I/O.

  Properly reduce the seqcount for both the initial buffer and in the
  read-ahead loop, which has the effect of terminating the loop early
  or not running it at all when the I/O is random.

* HAMMER was not scaling the seqcount for the heuristic to BKVASIZE.

* Thanks to Jan for spending the time required to bisect and track down the
  problem!

Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
sys/kern/vfs_cluster.c
sys/vfs/hammer/hammer_vnops.c