Btrfs: Throttle operations if the reference cache gets too large
authorChris Mason <chris.mason@oracle.com>
Tue, 29 Jul 2008 20:15:18 +0000 (16:15 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:05 +0000 (11:04 -0400)
commitab78c84de1ce4db1b2a2cef361625ad80abbab3f
treea9726645832b50da1da9a9690c4200c0f198ce7d
parent1a3f5d0400d786aec41ede15fec5710ad1a1d18b
Btrfs: Throttle operations if the reference cache gets too large

A large reference cache is directly related to a lot of work pending
for the cleaner thread.  This throttles back new operations based on
the size of the reference cache so the cleaner thread will be able to keep
up.

Overall, this actually makes the FS faster because the cleaner thread will
be more likely to find things in cache.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h