kernel - Attempt to workaround low memory deadlock
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 4 Nov 2011 17:52:33 +0000 (10:52 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 4 Nov 2011 17:52:33 +0000 (10:52 -0700)
commita639987cfd9a73c6bd718cb16c704e11d0e7ae42
tree05cfa251e60dbb4d2076c03e94308ee49fb11f5f
parent1af9e7c6bd9e664fa494f8878b6458d7fea2f7a9
kernel - Attempt to workaround low memory deadlock

* Mark the hammer flusher threads as system threads and call
  vm_wait_nominal() in the inode flush loop prior to acquiring
  an inode lock.

* This attempts to work around an issue where the pageout daemon has
  to do a BMAP indirectly via vnode_pager_put_pages(), which requires
  a dive into hammer deep enough to need the inode lock.

  The pageout daemon checks the vnode lock but has no visibility into
  the inode lock.  Only the hammer backend (theoretically) can acquire
  the inode lock without holding the vnode lock.  Hopefully this will
  improve the issue.

Reported-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
sys/vfs/hammer/hammer_flusher.c