linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: Speedup chunk allocation for large fs
@ 2019-01-30  7:39 Qu Wenruo
  2019-01-30  7:39 ` [PATCH 1/2] btrfs: Don't search devid for every verify_one_dev_extent() call Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Qu Wenruo @ 2019-01-30  7:39 UTC (permalink / raw)
  To: linux-btrfs

This patchset can be fetched from github:
https://github.com/adam900710/linux/tree/falloc_speedup

Which is based on v5.0-rc1 tag, with another enospc debug patch.

Btrfs falloc can be slower and slower when there are more and more block
groups.

One cause of this problem is find_free_dev_extent(), as it always search
from device offset 0, and if there are thousands existing dev extents
btrfs will search leaf by leaf until it reaches a free slot.

This is super slow and inefficient.

This patchset will introduce a new member,
btrfs_device::hint_free_dev_extent to give some hint for
find_free_dev_extent().

The full cause analyse and benchmark can be found in the 2nd patch.

Qu Wenruo (2):
  btrfs: Don't search devid for every verify_one_dev_extent() call
  btrfs: Introduce free dev extent hint to speed up chunk allocation

 fs/btrfs/volumes.c | 49 ++++++++++++++++++++++++++++-----------
 fs/btrfs/volumes.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 94 insertions(+), 13 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-02-08 22:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30  7:39 [PATCH 0/2] btrfs: Speedup chunk allocation for large fs Qu Wenruo
2019-01-30  7:39 ` [PATCH 1/2] btrfs: Don't search devid for every verify_one_dev_extent() call Qu Wenruo
2019-01-30  9:13   ` Nikolay Borisov
2019-01-31  9:38   ` Anand Jain
2019-01-30  7:40 ` [PATCH RFC 2/2] btrfs: Introduce free dev extent hint to speed up chunk allocation Qu Wenruo
2019-01-31  2:38   ` Qu Wenruo
2019-02-08 22:27 ` [PATCH 0/2] btrfs: Speedup chunk allocation for large fs David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).