Skip to content

RFC Btrfs: introduce extent buffer cache to btrfs

Miao Xie linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 RFC Latest4 patches 2 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Btrfs: restructure btrfs_search_slot()fs/btrfs/ctree.c+197 -1200 replies
2/4Btrfs: introduce extent buffer cache for each i-nodefs/btrfs/acl.c fs/btrfs/btrfs_inode.h fs/btrfs/compression.c +21 more+429 -470 replies
3/4Btrfs: introduce extent buffer cache for delayed inodefs/btrfs/delayed-inode.c+23 -00 replies
4/4Btrfs: introduce extent buffer cache for delayed referencefs/btrfs/extent-tree.c fs/btrfs/transaction.c fs/btrfs/transaction.h+18 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC][PATCH V2 0/4] Btrfs: introduce extent buffer cache to btrfs

This patchset introduce extent buffer cache to btrfs. The basic idea is to reduce the search time and the contentions of the extent buffer lock by re-using the last search result.

I ran stress.sh, xfstests and some other tools to test it, all of them worked well.

As a performance improvement patchset, of course we did performance test. Because this patchset is to improve the b+ tree search, in other words, it improves the performance of the metadata operations, we use file creation test to measure it. So we ran 10 tasks, and all of them created 100000 files in their own directories at the same time. As the result, we found this patchset makes btrfs ~20% faster(98s -> 77s).

we can pull this patchset from the URL

git://github.com/miaoxie/linux-btrfs.git extent-buffer-cache

Thanks
Miao
---
Miao Xie (4):
Btrfs: restructure btrfs_search_slot()
Btrfs: introduce extent buffer cache for each i-node
Btrfs: introduce extent buffer cache for delayed inode
Btrfs: introduce extent buffer cache for delayed reference

 fs/btrfs/acl.c           |    1 -
 fs/btrfs/btrfs_inode.h   |    6 +-
 fs/btrfs/compression.c   |    1 -
 fs/btrfs/ctree.c         |  598 ++++++++++++++++++++++++++++++++++++---------
 fs/btrfs/ctree.h         |   32 +++-
 fs/btrfs/delayed-inode.c |   23 ++
 fs/btrfs/dir-item.c      |    2 +
 fs/btrfs/disk-io.c       |    2 +-
 fs/btrfs/export.c        |    1 -
 fs/btrfs/extent-tree.c   |    6 +
 fs/btrfs/extent_io.c     |    9 +-
 fs/btrfs/extent_io.h     |   38 +++
 fs/btrfs/file-item.c     |    4 +-
 fs/btrfs/file.c          |    5 +-
 fs/btrfs/inode-item.c    |   10 +-
 fs/btrfs/inode.c         |   36 +++-
 fs/btrfs/ioctl.c         |    1 -
 fs/btrfs/ordered-data.c  |    1 -
 fs/btrfs/relocation.c    |    1 -
 fs/btrfs/send.c          |    1 -
 fs/btrfs/super.c         |    1 -
 fs/btrfs/transaction.c   |   11 +
 fs/btrfs/transaction.h   |    4 +-
 fs/btrfs/tree-log.c      |    6 +-
 fs/btrfs/xattr.c         |    2 +-
 25 files changed, 651 insertions(+), 151 deletions(-)