HAMMER 59G/Many: Stabilization pass (low memory issues)
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 1 Jul 2008 02:08:58 +0000 (02:08 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 1 Jul 2008 02:08:58 +0000 (02:08 +0000)
commitdf3016149e70f6553e40e96d6b84059a11645aec
tree3a7c412d37a9856b9606997e45fe14cb03e94c3a
parent4ecf7cc9c0bfba854db12b3d9cc529b0e705b65e
HAMMER 59G/Many: Stabilization pass (low memory issues)

Make adjustments in an attempt to remove deadlocks from the pageout and
buffer flushing paths when a system is low on memory.

* Restructure the low level storage allocator to use layer2->append_off
  and to move the blockmap lock deeper into the routine, pass the buffer
  ops.

* Do kmalloc()'s of critical structures accessed by the backend with
  M_USE_RESERVE.

* Have hammer_vop_write() call bwillwrite() unconditionally, even if
  called from the pageout daemon.  Do not release or relock the vnode
  at all.

  Theoretically bwillwrite() in the pageout path should still allow
  strategy calls from the buf_daemon threads to proceed, and not deadlock.

Reported-by: Gergo Szakal <bastyaelvtars@gmail.com>
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_blockmap.c
sys/vfs/hammer/hammer_cursor.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_vnops.c