http://bugzilla.suse.com/show_bug.cgi?id=1017461
http://bugzilla.suse.com/show_bug.cgi?id=1017461#c59
--- Comment #59 from Richard Weinberger ---
So, this issue should now be fixed by the following upstream commit?
commit fb235dc06fac9eaa4408ade9c8b20d45d63c89b7
Author: Qu Wenruo
Date: Wed Feb 15 10:43:03 2017 +0800
btrfs: qgroup: Move half of the qgroup accounting time out of commit trans
Just as Filipe pointed out, the most time consuming parts of qgroup are
btrfs_qgroup_account_extents() and
btrfs_qgroup_prepare_account_extents().
Which both call btrfs_find_all_roots() to get old_roots and new_roots
ulist.
What makes things worse is, we're calling that expensive
btrfs_find_all_roots() at transaction committing time with
TRANS_STATE_COMMIT_DOING, which will blocks all incoming transaction.
Such behavior is necessary for @new_roots search as current
btrfs_find_all_roots() can't do it correctly so we do call it just
before switch commit roots.
However for @old_roots search, it's not necessary as such search is
based on commit_root, so it will always be correct and we can move it
out of transaction committing.
This patch moves the @old_roots search part out of
commit_transaction(), so in theory we can half the time qgroup time
consumption at commit_transaction().
But please note that, this won't speedup qgroup overall, the total time
consumption is still the same, just reduce the performance stall.
Cc: Filipe Manana
Signed-off-by: Qu Wenruo
Reviewed-by: Filipe Manana
Signed-off-by: David Sterba
--
You are receiving this mail because:
You are on the CC list for the bug.