HAMMER VFS - Reduce stalls during bulk file operations
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 19 Feb 2010 18:41:22 +0000 (10:41 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 19 Feb 2010 18:41:22 +0000 (10:41 -0800)
commite98f1b96f17c57d1d59a4bba1d6a26b281767c07
tree434a866821447b783adb34d10f5a102f16a762d1
parent1f06d4cf3aff0c4879d54ace2606f72fdb00bca6
HAMMER VFS - Reduce stalls during bulk file operations

* Track modifying inode operations on a per-PID basis (loosely) and
  call hammer_inode_wait_reclaims() earlier for those pids.

  The algorithm selects a wait point based on the process's perceived
  contribution to the inode load.  The greater the contribution, the
  more readily we stall the process in order to wait for related reclaims
  to process.

  Processes with lower loads have higher reclaim points and do not stall
  as readily as they did before.

* Remove waitreclaims calls based on B-Tree scans.  I'm not sure why I had
  this in there but it was creating an excessive number of unnecessary
  stalls, so if any problems crop up I'll have to find another way to deal
  with them.

* These changes (particularly the first) should reduce unnecessary stalls
  for the programs not doing heavy inode operations.  Hopefully that means
  rm -rf and tar extractions will not have as quite the detrimental effect
  on other processes as they did before.
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_prune.c
sys/vfs/hammer/hammer_transaction.c
sys/vfs/hammer/hammer_vnops.c