Fix some IO sequencing performance issues and reformulate the strategy
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 22 Apr 2008 18:46:54 +0000 (18:46 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 22 Apr 2008 18:46:54 +0000 (18:46 +0000)
commitf2d7fcf0efee6f61aa30ae0121427dda1b1c7a5e
treed18ed73384c0ee033e0da46a1dc35ba9da04d65c
parentb276424cf194bde194d46c3828a0ffd526372909
Fix some IO sequencing performance issues and reformulate the strategy
we use to deal with potential buffer cache deadlocks.  Generally speaking
try to remove roadblocks in the vn_strategy() path.

* Remove buf->b_tid (HAMMER no longer needs it)

* Replace IO_NOWDRAIN with IO_NOBWILL, requesting that bwillwrite() not
  be called.  Used by VN to try to avoid deadlocking.  Remove B_NOWDRAIN.

* No longer block in bwrite() or getblk() when we have a lot of dirty
  buffers.   getblk() in particular needs to be callable by filesystems
  to drain dirty buffers and we don't want to deadlock.

* Improve bwillwrite() by having it wake up the buffer flusher at 1/2 the
  dirty buffer limit but not block, and then block if the limit is reached.
  This should smooth out flushes during heavy filesystem activity.
sys/dev/disk/vn/vn.c
sys/kern/vfs_bio.c
sys/kern/vfs_cluster.c
sys/sys/buf.h
sys/sys/vnode.h
sys/vfs/nfs/nfs_bio.c
sys/vfs/ufs/ufs_readwrite.c