]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - fs/btrfs/extent-tree.c
Btrfs: fix our overcommit math
authorJosef Bacik <jbacik@fusionio.com>
Thu, 6 Sep 2012 20:59:33 +0000 (16:59 -0400)
committerChris Mason <chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:19:16 +0000 (15:19 -0400)
commita80c8dcf7e5065adc555ef8ffb256df11e3293e3
tree78ea998575c512728eea26c7b76f7bbfb421c323
parentdea31f52337c18f19eadfbbccb0c477942dad495
Btrfs: fix our overcommit math

I noticed I was seeing large lags when running my torrent test in a vm on my
laptop.  While trying to make it lag less I noticed that our overcommit math
was taking into account the number of bytes we wanted to reclaim, not the
number of bytes we actually wanted to allocate, which means we wouldn't
overcommit as often.  This patch fixes the overcommit math and makes
shrink_delalloc() use that logic so that it will stop looping faster.  We
still have pretty high spikes of latency, but the test now takes 3 minutes
less time (about 5% faster).  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/extent-tree.c