btrfs: add cond_resched to btrfs_qgroup_trace_leaf_items
PATCH 1/1 btrfs: add cond_resched to btrfs_qgroup_trace_leaf_items
From: Jeff Mahoney <[email protected]>
On an uncontended system, we can end up hitting soft lockups while doing replace_path. At the core, and frequently called is btrfs_qgroup_trace_leaf_items, so it makes sense to add a cond_resched there.
Signed-off-by Jeff Mahoney <[email protected]>
--- fs/btrfs/qgroup.c | 1 + 1 file changed, 1 insertion(+)
fs/btrfs/qgroup.c +1 -0
@@ -1559,6 +1559,7 @@ int btrfs_qgroup_trace_leaf_items(struct btrfs_trans_handle *trans,if (ret)return ret; } +cond_resched ();return 0 ; }
Signature · 1 line
2.11.0
Quoted 8 lines · On Tue, Jun 20, 2017 at 08:15:26AM -0400, [email protected] wrote:
From: Jeff Mahoney <[email protected]>
On an uncontended system, we can end up hitting soft lockups while doing
replace_path. At the core, and frequently called isbtrfs_qgroup_trace_leaf_items, so it makes sense to add acond_reschedthere.Signed-off-by Jeff Mahoney <[email protected]>
Reviewed-by David Sterba <[email protected]>