summaryrefslogtreecommitdiff
path: root/net/dsa/slave.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2015-01-06 20:18:45 +0000
committerChris Mason <clm@fb.com>2015-01-21 18:02:04 -0800
commit6219872dc6e56529159f04e73587ed0fcd63eb20 (patch)
tree4129c11c168f2ed78e945d72f9017ee6a3d81e32 /net/dsa/slave.c
parent730a78c741df4eaa24589015191f03c2d1240091 (diff)
Btrfs: lookup for block group only if needed when freeing a tree block
Very often our extent buffer's header generation doesn't match the current transaction's id or it is also referenced by other trees (snapshots), so we don't need the corresponding block group cache object. Therefore only search for it if we are going to use it, so we avoid an unnecessary search in the block groups rbtree (and acquiring and releasing its spinlock). Freeing a tree block is performed when COWing or deleting a node/leaf, which implies we are holding the node/leaf's parent node lock, therefore reducing the amount of time spent when freeing a tree block helps reducing the amount of time we are holding the parent node's lock. For example, for a run of xfstests/generic/083, the block group cache object was needed only 682 times for a total of 226691 calls to free a tree block. Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'net/dsa/slave.c')
0 files changed, 0 insertions, 0 deletions