]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: do not use btrfs_end_transaction_throttle everywhere
authorJosef Bacik <josef@redhat.com>
Fri, 13 Jan 2012 00:10:12 +0000 (19:10 -0500)
committerGuru Anbalagane <guru.anbalagane@oracle.com>
Fri, 27 Jan 2012 01:20:55 +0000 (17:20 -0800)
commita6b647aec95f852b229427b38796713227993da2
tree5beceb0d0018f5be563639fcd37db54030bbd906
parente44dbce69b5193cd1a0b6214d24097dc1e6ca9f4
Btrfs: do not use btrfs_end_transaction_throttle everywhere

A user reported a problem where things like open with O_CREAT would take up to
30 seconds when he had nfs activity on the same mount.  This is because all of
our quick metadata operations, like create, symlink etc all do
btrfs_end_transaction_throttle, which if the transaction is blocked will wait
for the commit to complete before it returns.  This adds a ridiculous amount of
latency and isn't really needed.  The normal btrfs_end_transaction will mark the
transaction as blocked and wake the transaction kthread up if it thinks the
transaction needs to end (this being in the running out of global reserve space
scenario), and this is all that is really needed since we've already done
everything we're going to do, we just need to return.  This should help people
with the latency they were seeing when using synchronous heavy workloads.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
(cherry picked from commit 7ad85bb76a61801362701b77c5cee5aa09f35369)
fs/btrfs/inode.c
fs/btrfs/xattr.c