Fix some IO sequencing performance issues and reformulate the strategy
commit469701d05c3ef52a17e7c3df3795dd6b46cca8eb
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 22 Apr 2008 18:46:54 +0000 (22 18:46 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 22 Apr 2008 18:46:54 +0000 (22 18:46 +0000)
tree0910c2c385698414a3565a6119e2e7ab6f2e45d8
parent306c11a2b322b76ee9eb7773de873ee4f738dcf0
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