HAMMER VFS - The backend flusher now sorts inodes
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 2 Nov 2009 17:11:46 +0000 (09:11 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 2 Nov 2009 17:11:46 +0000 (09:11 -0800)
commitff003b11ff22dd10f420eba8a38b7c0838d79acd
tree7326c4f950358398f9764dd7795b88eab389d551
parent1a607e3ed67d5adacd68127a7c4a04fa78e91390
HAMMER VFS - The backend flusher now sorts inodes

* Change the tailq of inodes in a flush group to a red-black tree.
  The flusher now processes inodes in sorted order and breaks them up
  into larger sets for concurrent flushing.  The flusher threads are thus
  more likely to concurrently process inodes which are fairly far apart
  in the B-Tree.

  This greatly reduces lock interference between flusher threads.  However,
  B-Tree deadlocks are still an issue between inodes undergoing flushes
  and front-end access operations.  This can be observed by noting periods
  of low dev-write activity in 'hammer iostats 1' output during a blogbench
  test.  The hammer-S* kernel threads will likely be in a 'hmrdlk' state
  at the same time.

* Add sysctl vfs.hammer.limit_reclaim to set the maximum
  number of inodes with no vnode associations, default 4000.

  NOTE: For debugging only, setting this value too high will blow
  out the kmalloc pool.
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_flusher.c
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_vfsops.c