HAMMER VFS - Ensure sufficient free memory is available before large allocation
commitc652be54ae5f31f13eb03acfa533b9228843a7c0
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 5 Mar 2010 00:06:53 +0000 (4 16:06 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 5 Mar 2010 00:06:53 +0000 (4 16:06 -0800)
tree7ab3df996f94178a36dba068ee727c7317b0390c
parent163f8d24149b4939b8db823ddbdd7e09928e971d
HAMMER VFS - Ensure sufficient free memory is available before large allocation

* The HAMMER rebalancing code can be a heavy user of kernel memory when
  collecting B-Tree nodes to rebalance.

  Call the new vm_wait_nominal() function before allocating said memory
  in an attempt to avoid VM/VFS deadlocks when memory is low.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_rebalance.c