DragonFly commits List (threaded) for 2010-03
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
git: HAMMER VFS - frontload kmalloc()'s when rebalancing
commit 24cf83d2ed18a34bd6fc6fa42c1845f7c69c12f3
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date: Sat Mar 20 13:01:38 2010 -0700
HAMMER VFS - frontload kmalloc()'s when rebalancing
* The rebalancing code must allocate upwards of 16MB of memory to hold
copies of B-Tree nodes (~64*64*4K). This is enough to blow out the
emergency memory reserve used by the pageout daemon and deadlock the
system in low memory situations.
* Refactor the allocations. Allocate all the memory up-front so no
major allocations occur while nodes in the B-Tree are held locked.
* There are probably other cases where this may become a problem. With
UFS it wasn't an issue because flushing a file was fairly unsophisticated.
But with HAMMER certain aspects of the flush require B-Tree lookups and
can't be dumbed down to a simple raw disk write.
The rebalancing code was the most aggregious abuser of kernel memory
though and that should now be fixed.
Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
Summary of changes:
sys/vfs/hammer/hammer.h | 12 +++-
sys/vfs/hammer/hammer_btree.c | 121 +++++++++++++++++++++++++++++++------
sys/vfs/hammer/hammer_rebalance.c | 15 +++--
sys/vfs/hammer/hammer_reblock.c | 4 +-
4 files changed, 124 insertions(+), 28 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/24cf83d2ed18a34bd6fc6fa42c1845f7c69c12f3
--
DragonFly BSD source repository
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]